关键字exists 和not exists AND select null from table

  • select null from table。

这句sql语句的作用:查询表中的数据,如果有则返回为NULL ,就是把select * from table 中的所有信息替换成NULL ,理解一下就比较简单了。

图解
select null from table,exists和not exists 关键字的理解和使用场合
select null from table,exists和not exists 关键字的理解和使用场合

  • exists 关键字

exists 这个关键字返回的为boolean 类型的,并不是一些数据关联,如果条件成立。就返回为true ,表明这个条件成立,否则 false .

图解
select null from table,exists和not exists 关键字的理解和使用场合
select null from table,exists和not exists 关键字的理解和使用场合
总结

select null from table 就是把符合查询条件的数据所显示的数据替换成NULL。exists 就是如果存在数,就是true ,不存在就为false 。

相关文章:

  • 2021-12-22
  • 2022-01-21
  • 2021-06-06
  • 2021-11-05
  • 2021-05-20
  • 2021-06-12
  • 2021-11-23
  • 2021-09-23
猜你喜欢
  • 2021-11-10
  • 2021-05-08
  • 2021-08-10
  • 2021-07-21
  • 2022-01-10
  • 2021-11-18
  • 2022-02-05
相关资源
相似解决方案