-- 假设表里的UID 字段为整形非空
select top 4 * from LIME_USER_INFO where plan_ID = null or (:a IS NULL) and sid = 99233
-- 当变量a为null 时,相当于去掉UID 过滤,提高程序的兼容
```eregr
-- 假设表里的UID 字段为整形非空
select top 4 * from LIME_USER_INFO where plan_ID = null or (:a IS NULL) and sid = 99233
-- 当变量a为null 时,相当于去掉UID 过滤,提高程序的兼容
```eregr
本文标题:SQL-高级用法-之一行sql搞定
本文链接:https://www.haomeiwen.com/subject/nlpwgftx.html
网友评论