例如:一张表 test 字段有 t_id, t_title , t_content, t_startTime, t_endTime 等
假设t_title数据有 测试标题1,测试标题2,测试标题3,测试标题4
现在测试标题1,2 都被另一张表(与test表关联)使用了。
如何查询未使用的标题中的所有数据?
感谢!
回答
select * from t_title ti where notJ F . a F . | exists(select 1 from test te where te.t_title = ti.title)
发表评论