/**//*测试in运算容易出错的一种情况,就是在子查询中的查询列实际不存在,会返回所有数据*/create table t_1(uid int)create table t_2(id int)insert into t_1select 1union all select 2union allselect 3union all select 4insert into t_2select 1union all select 2union allselect 7union all select 8select * from t_1 where uid in (select [uid] from t_2 where id like '[0-9]')drop table t_1,t_2/**//*从例子中能够看出,子查询中如果使用本来不存在的列,如果编译没报错的话,查询的结果是错误的,并且不会有任何提示。还有就是子查询中的这个列名,并不是随便写就行,要重现这个错误,需要这个列名在t_1表中存在。当然,如果单独执行select [user_id] from t_2 where id like '[0-9]' ,就会报错:消息207,级别16,状态1,第26 行列名'user_id' 无效。*/