SQL贴吧群里面的人态度真差
sql吧
全部回复
仅看楼主
level 14
2012年09月17日 06点09分 1
level 11
还是自己玩好些,愿意交流的大家一起交流,像这样挤到一起,林子大了就什么鸟都有了。很多都持着自己有点知识这很了不起,最看不惯了。就算错了也应该礼貌指出,给予更正,相信大家都能学到。个人觉得侯哥就挺不错的。
2012年09月17日 11点09分 3
level 2
a.date_id=b.date_id这种是用在内联接的格式
你用where直接 a,b就好了
2012年09月18日 22点09分 6
level 9
根据你写的代码看,你是否想从表1当中查询出在表2当中具有条件date_id='xxxx-xx-xx'的记录?如果是的话,可以使用两种方法:
1、内连接
select a.字段1,a.字段2 from 表1 a,表2 b;
where a.date_id=b.date_id and b.a.date_id='xxxx-xx-xx'
2、左连接
select a.字段1,a.字段2 from 表1 a left join 表2 b;
on a.date_id=b.date_id and b.a.date_id='xxxx-xx-xx'
3、嵌套查询
select 字段1,字段2 from 表1;
where date_id in (select date_id from 表2 date_id='xxxx-xx-xx')

2012年09月19日 01点09分 8
level 14
谢谢各位哈,提问的人不是我
2012年09月19日 02点09分 9
level 14
我只是看群里某些人态度实在恶劣,故发此贴。
谢谢上面那些热心的朋友们!
2012年09月19日 02点09分 10
1