多个条件查詢,可以只输入一个,也可以输入2个或多个.甚至不输入.不输入就列出全部.


select * from 表名
 where (名字=@name or @name is null) and (工资<@pay1 or @pay1 is null) and (工资>@pay2 or @pay2 is null)

相关文章:

  • 2021-10-05
  • 2022-03-08
  • 2021-08-28
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-21
  • 2021-11-23
  • 2022-12-23
  • 2021-06-26
  • 2021-09-21
  • 2021-07-09
相关资源
相似解决方案