解释:此处查询id不在pid出现,以/qwe开头,userId为15的数据。子查询加上where是为了加快查询效率。
SELECT * from file where filePath like concat( "/qwe", '%') and userId =15 and id NOT IN(SELECT pid from file where filePath like concat( "/qwe", '%') and userId =15)
解释:此处查询id不在pid出现,以/qwe开头,userId为15的数据。子查询加上where是为了加快查询效率。
SELECT * from file where filePath like concat( "/qwe", '%') and userId =15 and id NOT IN(SELECT pid from file where filePath like concat( "/qwe", '%') and userId =15)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。