当前位置:网站首页>Data types ntext and varchar are incompatible in the not equal to operator - 95 small pang
Data types ntext and varchar are incompatible in the not equal to operator - 95 small pang
2022-07-05 10:50:00 【Ninth Five Year Plan small pang】
SQL sentence :select * from A where test=’xxx’
After execution, there will be :
data type ntext and varchar stay equal to Incompatible error messages in operator .
Is it worth ntext Just type ?
That handle SQL Statement should become :select * from A where test=convert(ntext,’xxx’)
Results appear : data type ntext and ntext stay equal to Incompatible error messages in operator .
There are many ways to solve this problem 2 Kind of way :
1. Directly change the database field type ....( No cure )
2. hold SQL Statement modified to :
select * from A where convert(nvarchar(255),test)=’xxx’
Because it doesn't matter text still nvarchar, All mappings in entity classes should be string, because C# only one string Is used to represent strings , However, these two data types are completely different in the database , Therefore, it is impossible to compare them , Especially that one ntext, Many operations cannot be done , Even if it's two ntext type , There is no way to compare . It's fine too select * from A where test like’xxx’
边栏推荐
- 32: Chapter 3: development of pass service: 15: Browser storage media, introduction; (cookie,Session Storage,Local Storage)
- [JS] array dimensionality reduction
- Node の MongoDB Driver
- How can gbase 8C database view the login information of the login user, such as the date, time and IP of the last login authentication?
- 【DNS】“Can‘t resolve host“ as non-root user, but works fine as root
- 手机厂商“互卷”之年:“机海战术”失灵,“慢节奏”打法崛起
- Do you really understand the things about "prototype"? [part I]
- Implement the rising edge in C #, and simulate the PLC environment to verify the difference between if statement using the rising edge and not using the rising edge
- SAP ui5 objectpagelayout control usage sharing
- C language QQ chat room small project [complete source code]
猜你喜欢
磨礪·聚變|知道創宇移動端官網煥新上線,開啟數字安全之旅!
基于昇腾AI丨以萨技术推出视频图像全目标结构化解决方案,达到业界领先水平
手机厂商“互卷”之年:“机海战术”失灵,“慢节奏”打法崛起
2022年T电梯修理操作证考试题及答案
In the year of "mutual entanglement" of mobile phone manufacturers, the "machine sea tactics" failed, and the "slow pace" playing method rose
Who is the "conscience" domestic brand?
32: Chapter 3: development of pass service: 15: Browser storage media, introduction; (cookie,Session Storage,Local Storage)
九、磁盘管理
Broyage · fusion | savoir que le site officiel de chuangyu mobile end est en ligne et commencer le voyage de sécurité numérique!
Comparative learning in the period of "arms race"
随机推荐
Secteur non technique, comment participer à devops?
Learning Note 6 - satellite positioning technology (Part 1)
[可能没有默认的字体]Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename……
Solution to the length of flex4 and Flex3 combox drop-down box
Explanation of full vulnerability script of network security C module of secondary vocational group script containing 4 vulnerabilities
csdn软件测试入门的测试基本流程
Ad20 make logo
重磅:国产IDE发布,由阿里研发,完全开源!
双向RNN与堆叠的双向RNN
String
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
web安全
Sqlserver regularly backup database and regularly kill database deadlock solution
Comparative learning in the period of "arms race"
小红书自研KV存储架构如何实现万亿量级存储与跨云多活
GBase 8c数据库如何查看登录用户的登录信息,如上一次登录认证通过的日期、时间和IP等信息?
The first product of Sepp power battery was officially launched
Common functions of go-2-vim IDE
2022年危险化学品生产单位安全生产管理人员特种作业证考试题库模拟考试平台操作
Array