(大家好)这样的语句在mysql里能通过吗:select f1 from table1 where f2 in (select f3 from table2); select f1 from table1 where f2 in (select f3 from table2);MySQL4.1.0以上才支持子查询,但可以这样:select f1 from table1 t1 inner join table2 t2 on t1.f2=t2.f3 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 子查询可不可以化为复合查询:select f1 from table1、table2 where table1.f2 = table2.f3;=========为什么?? 谁能给我一个这样的例子table1 中是个大数集,而table2 是其中的子集,就是说 table2 表中的数据都是从table1中得到的,它们都有一个共同的字段 item_id .但table2 中的item_id的数据可以有重复的,我现在要求把table1中没有在table2中出现过的数据拿出来,我在MSSQL 中可以这样写,为什么在mysql中不可以呢?select item_id from table1 where item_id not in(select distinct item_id from table2) 找到了http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=40441用习惯了msSQL ,来用mySQL 真不习惯,很多命令都不能用!唉!!! mysql中的collation什么意思 其中的utf8-bin 香港空间数据丢失 求SQL语句。将数据库A中的tb表,用数据库B中的tb表覆盖更新 在mysql 中如何创建一个新的管理员用户 C连接mysql出现的问题! 救命啊!!! can't connect to local mysql server through socket 'tmp/mysql.sock' 谁有delphi连接mysql的例子,能给一个吗?? Mysql数据库触发器执行不成功 求存储过程 mysql 分表问题:性能没有提升 请帮忙:把这个文本倒进数据库(在线等ing),多谢! 一个mysql查询的问题
为什么??
table1 中是个大数集,而table2 是其中的子集,就是说 table2 表中的数据都是从table1中得到的,它们都有一个共同的字段 item_id .但table2 中的item_id的数据可以有重复的,我现在要求把table1中没有在table2中出现过的数据拿出来,
我在MSSQL 中可以这样写,为什么在mysql中不可以呢?
select item_id from table1 where item_id not in(select distinct item_id from table2)