当前位置:网站首页>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’
边栏推荐
- SqlServer定时备份数据库和定时杀死数据库死锁解决
- In the year of "mutual entanglement" of mobile phone manufacturers, the "machine sea tactics" failed, and the "slow pace" playing method rose
- 上拉加载原理
- csdn软件测试入门的测试基本流程
- Data type
- How can non-technical departments participate in Devops?
- 数组、、、
- Nuxt//
- 使用GBase 8c数据库过程中报错:80000502,Cluster:%s is busy,是怎么回事?
- GO项目实战 — Gorm格式化时间字段
猜你喜欢

Based on shengteng AI Yisa technology, it launched a full target structured solution for video images, reaching the industry-leading level

Go-3-the first go program

AD20 制作 Logo

go语言学习笔记-初识Go语言

Web3 Foundation grant program empowers developers to review four successful projects

微信核酸检测预约小程序系统毕业设计毕设(6)开题答辩PPT

九、磁盘管理

32:第三章:开发通行证服务:15:浏览器存储介质,简介;(cookie,Session Storage,Local Storage)

微信核酸检测预约小程序系统毕业设计毕设(8)毕业设计论文模板

【DNS】“Can‘t resolve host“ as non-root user, but works fine as root
随机推荐
Use bat command to launch common browsers with one click
【Vite】1371- 手把手开发 Vite 插件
数组、、、
[JS] array dimensionality reduction
Review the whole process of the 5th Polkadot Hackathon entrepreneurship competition, and uncover the secrets of the winning projects!
Nine degrees 1480: maximum ascending subsequence sum (dynamic programming idea for the maximum value)
SqlServer定时备份数据库和定时杀死数据库死锁解决
2022年危险化学品生产单位安全生产管理人员特种作业证考试题库模拟考试平台操作
Array
What are the top ten securities companies? Is it safe to open an account online?
运算符、、
websocket
九、磁盘管理
websocket
关于vray5.2怎么关闭日志窗口
[paper reading] ckan: collaborative knowledge aware autonomous network for adviser systems
一次edu证书站的挖掘
[vite] 1371 - develop vite plug-ins by hand
关于vray 5.2的使用(自研笔记)(二)
Ad20 make logo