sql语句中in的用法是怎样使用的,如下两条sql语句有什么区别?
selecta.*fromsell_waste_alla,token_present_chibwherea.selldatebetween'2015-9-7'and'20...
select a.* from sell_waste_all a,token_present_chi b
where a.selldate between '2015-9-7' and '2015-9-20' and a.code=b.code and b.id='0C200001608190001';
select * from sell_waste_all where selldate between '2015-9-7' and '2015-9-20' and code in(
select code from token_present_chi where id='0C200001608190001'
); 展开
where a.selldate between '2015-9-7' and '2015-9-20' and a.code=b.code and b.id='0C200001608190001';
select * from sell_waste_all where selldate between '2015-9-7' and '2015-9-20' and code in(
select code from token_present_chi where id='0C200001608190001'
); 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询