sql--仅用来测试blog
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-02 06:19 点击:次
Sql代码
create table people(
id int ,
sex varchar(20),
class int
);
create table class(
id int ,
classno varchar(20)
);
insert into people value(1,'g',1),
(2,'b',2),
(3,'g',3);
insert into class value (1,'one class'),
(2,'two class');
select * from people;
select * from class;
select * from people p,class c where p.class=c.id;
select * from people p left join class c on p.class=c.id;
select * from people p right join class c on p.class=c.id;
select * from people p cross join class c;
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>