[SQL ] MSSQL 使用select from not in

楼主: neocc (neo)   2016-03-08 13:33:30
数据库名称:MSSQL
数据库版本:MSSQL 2013
内容/问题描述:
各位好 我有两个表 都有自己的非Key 字段 UID
A表
ID UID content1
作者: bohei (run and fall)   2016-03-08 13:34:00
where not exists(select ....)
作者: kb0130 (乌拉拉)   2016-03-09 10:11:00
Delete from a where not exists (select 1 from b whereA.uid=b.uid)

Links booklink

Contact Us: admin [ a t ] ucptt.com