SQL 语句子查询怎么写?
如何写一个在另一个复合条件的查询记录中进行符合条件的查询
select * from tablename where name='asd' and info='INFO' and code like '001*'
这里的and code like '001*' 能不能作为一个子集(因为上面并列的时候它没有生效)
比如 :select * from tablename where code in select * from tablename where name='asd' and info='INFO' and code like '001*'
我知道这样肯定不对,不知如何解决这个问题?