当前位置:网站首页>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多岁就是最好的年纪,也是一个男人最好的年纪,我觉得你应该努力一把,也许人家根本就不在意钱呢!
边栏推荐
- About the writing of ALV format control part
- @Configuration (proxybeanmethods = false) what's the use of setting this to false
- First ALV program 2
- What have I learned from 200 machine learning tools?
- [redis series] string data structure
- (2022 Hangdian multi school III) 1011 link is as bear (thinking + linear basis)
- [introduction to C language] zzulioj 1031-1035
- [principle] several ways of horizontal penetration
- HCIP BGP
- 企业网的三层架构
猜你喜欢

LVS+KeepAlived高可用部署实战应用

(2022 Hangdian multi school III) 1002 boss rush (pressure dp+ dichotomy)

CUB_ Visualization of key points in 200 bird dataset

SQL window function

Typescript from getting started to mastering (XVI) configuration file - first knowledge of compileroptions configuration item

Data mining -- Introduction to the basis of association analysis (Part 1)

内连接和左连接简单案例

Lvs+keepalived high availability deployment practical application

Interview essential! TCP classic 15 consecutive questions!
![MOS tube - rapid recovery application notes (II) [parameters and applications]](/img/54/eb040a51304192def8cfb360c7c213.png)
MOS tube - rapid recovery application notes (II) [parameters and applications]
随机推荐
String template of ES6 new features and methods to simplify objects and functions
C语言实现三子棋游戏(详解)
Simple cases of inner connection and left connection
Microcomputer principle and interface technology
RHCE的at,crontab的基本操作,chrony服务和对称加密和非对称加密
[redis series] string data structure
Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization
Ssl== certificate related concepts
内连接和左连接简单案例
MySQL第三篇
Raft protocol - process demonstration
Simple use of eventbus
Object array merges elements according to a field
LDP -- label distribution protocol
5年多工作经验,工资给15k,要是你,你会接受吗?
Why do programmers so "dislike" the trunk development mode?
Form verification of landline
【C语言入门】ZZULIOJ 1031-1035
Shopify卖家:EDM营销就要搭配SaleSmartly,轻松搞定转化率
Typescript from getting started to mastering (XXIII) namespace namespace (Part 2)