使用子查询的问题
select * from table1 where col1 in (select colxx from table2 where....)
这样的子查询是没有问题的
但是我想实现下面的子查询,可以吗?
select * from table1 where col1 > (select colxx from table2 where id=‘id’)
子查询的结果,我可以保证是一条(id为主键),但是好像不能这么用啊。
有什么方法能够代替吗?
要求在SQL语句中实现,不使用存储过程