码迷,mamicode.com
首页 > 其他好文 > 详细

Exists 和Not Exists使用

时间:2019-09-03 18:11:42      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:ima   img   exist   info   sql语句   语句   png   返回结果   sts   

描述:exists表示()内子查询语句返回结果不为空说明where条件成立就会执行主sql语句,如果为空就表示where条件不成立,sql语句就不会执行。not exists和exists相反,子查询语句结果为空,则表示where条件成立,执行sql语句。负责不执行。

使用:技术图片

 

 技术图片

 

Exists 和Not Exists使用

标签:ima   img   exist   info   sql语句   语句   png   返回结果   sts   

原文地址:https://www.cnblogs.com/lovelySteelPot/p/11454580.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!