a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c * 说明:日程安排提前五分钟提醒 select*from 日程安排 wheredatediff('minute',f开始时间,getdate())>5 * 说明:两张关联表,删除主表中已经在副表中没有的信息 deletefrom info wherenotexists ( select*from infobz where info.infid=infobz.infid ) * 说明:--