📜  sql server 存储过程中的动态 where 子句 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:58.959000             🧑  作者: Mango

代码示例1
WHERE 1 = 1
AND (@what     IS NULL OR [companies_SimpleList].[Description] Like @What )
AND (@keywords IS NULL OR companies_SimpleList.Keywords        Like @Keywords)
AND (@where    IS NULL OR companies_SimpleList.FullAdress      Like @Where)
...