当前位置:网站首页>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’
边栏推荐
- Web3基金会「Grant计划」赋能开发者,盘点四大成功项目
- [vite] 1371 - develop vite plug-ins by hand
- NAS and San
- Learning note 4 -- Key Technologies of high-precision map (Part 2)
- Go项目实战—参数绑定,类型转换
- [paper reading] ckan: collaborative knowledge aware autonomous network for adviser systems
- 数组、、、
- 【DNS】“Can‘t resolve host“ as non-root user, but works fine as root
- Explanation of message passing in DGL
- Based on shengteng AI Yisa technology, it launched a full target structured solution for video images, reaching the industry-leading level
猜你喜欢

关于vray 5.2的使用(自研笔记)(二)

Who is the "conscience" domestic brand?

32: Chapter 3: development of pass service: 15: Browser storage media, introduction; (cookie,Session Storage,Local Storage)

基于昇腾AI丨以萨技术推出视频图像全目标结构化解决方案,达到业界领先水平

Comparative learning in the period of "arms race"

The first product of Sepp power battery was officially launched

"Everyday Mathematics" serial 58: February 27

非技術部門,如何參與 DevOps?

2022鹏城杯web

【Vite】1371- 手把手开发 Vite 插件
随机推荐
iframe
【DNS】“Can‘t resolve host“ as non-root user, but works fine as root
Ad20 make logo
32: Chapter 3: development of pass service: 15: Browser storage media, introduction; (cookie,Session Storage,Local Storage)
Data type
LDAP overview
NAS and San
Taro进阶
Some understandings of heterogeneous graphs in DGL and the usage of heterogeneous graph convolution heterographconv
Go语言-1-开发环境配置
九度 1480:最大上升子序列和(动态规划思想求最值)
关于vray 5.2的使用(自研笔记)
Go language-1-development environment configuration
风控模型启用前的最后一道工序,80%的童鞋在这都踩坑
脚手架开发进阶
The first product of Sepp power battery was officially launched
[paper reading] ckan: collaborative knowledge aware autonomous network for adviser systems
uniapp
Blockbuster: the domestic IDE is released, developed by Alibaba, and is completely open source!
C#实现获取DevExpress中GridView表格进行过滤或排序后的数据