当前位置:网站首页>SQL server当存储过程接收的参数是int类型时,如何做判断?
SQL server当存储过程接收的参数是int类型时,如何做判断?
2022-07-29 03:58:00 【太阳的后裔】
利用cast(接收的参数 as varchar(10))将其改成varchar类型再将与之对应的值添加引号做判断即可
--接收类型
@IsAdCustomer int
--做判断
if cast(@IsAdCustomer as varchar(10)) = '1'
BEGIN
set @queryType = @queryType + ' IsAdCustomer > 0 and '
END
if cast(@IsAdCustomer as varchar(10)) = '2'
BEGIN
set @queryType = @queryType + ' IsAdCustomer = 0 and '
END
你为什么不结婚?
同事a:我妈说如果没有房子,别的女的都懒得见你一眼!
同事b:你有女朋友后,你每周都要找时间陪她吧!陪她要请她吃饭吧!要请她看电影!逛街!喝奶茶吧!你不准备每个月在你女朋友身上花个几千块你怎么维持你们之间的关系呢?
朋友c:你没有准备十几万的彩礼,你怎么结婚?就算别人本人不在意,可是你过得了别人家里那关吗?反正我家里的标准大概就是15万左右的样子!
…
已结婚的朋友d:我觉得那都不是主要的问题,主要的问题是20多岁就是最好的年纪,也是一个男人最好的年纪,我觉得你应该努力一把,也许人家根本就不在意钱呢!
边栏推荐
- 【redis系列】字符串数据结构
- Shutter start white screen
- Why is continuous integration and deployment important in development?
- "Strangers once met" Summer Street Shen Shuyan_ Xia Mo Shen Shuyan's latest chapter
- MySQL第四篇(完结)
- 1. Mx6u driver development-2-led driver
- [introduction to C language] zzulioj 1031-1035
- Deconstruction assignment of new features of ES6
- Simple use of eventbus
- [principle] several ways of horizontal penetration
猜你喜欢
Connection broken by 'readtimc rt-443): read timed out (read timeout=l5)“)‘: /pac
MOS tube - rapid recovery application notes (II) [parameters and applications]
Ssl== certificate related concepts
Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization
HCIP BGP
华为天才少年稚晖君做了一把模块化机械键盘,引起极客圈地震,网友:这才是真正的客制化...
Batch production and upload sales NFT opensea eth polygon
I.MX6U-驱动开发-2-LED驱动
EMD empirical mode decomposition
向日葵远程控制为何采用BGP服务器?自动最优路线、跨运营商高速传输
随机推荐
3.解决Pycharm报错Unresolved reference ‘selenium‘ Unresolved reference ‘webdriver‘
Getting started with caspin
谁能详细说下mysqlRC下的半一致读和怎么样减少死锁概率?
Is the browser multi process or single process?
MySQL第三篇
C语言实现三子棋游戏(详解)
Connection broken by 'readtimc rt-443): read timed out (read timeout=l5)“)‘: /pac
无法一次粘贴多张图片
Lucifer 98 life record ing
Overestimated test driven development?
Vs code must know and know 20 shortcut keys!
SQL window function
向日葵远程控制为何采用BGP服务器?自动最优路线、跨运营商高速传输
"The programming is not standardized, and my colleagues are in tears!"
Press the missing number of interview question 17.04 | | 260. the number that appears only once (including bit operation knowledge points)
小马智行进军前装量产,从自研域控制器入手?
Some notes on uniapp
Raft protocol - process demonstration
How fast does it take to implement a super simple language
LDP -- label distribution protocol