我想将空值放在两列之一中,这是我唯一的. [英] I want to put null value in one of the two column, which I have made unique.

查看:85
本文介绍了我想将空值放在两列之一中,这是我唯一的.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在特定表中为两列创建唯一键(使两列成为唯一组合值).

我按照以下步骤操作,它们工作正常,现在,我想将空值放在两列之一中,这是我唯一的.

它不接受空值.

因此,我该怎么办?

I am going to make Unique key for two Columns (to make Unique combination value of two columns) in specific table.

I have followed below steps, they are working fine, now, I want to put null value in one of the two column, which I have made unique.

It don''t accept the null values.

So what should I do?

推荐答案

SQL Server不允许Unique列具有多个NULL值.除非您迁移到Oracle,否则您将无法做自己想要做的事情.
SQL Server does not allow Unique columns to have more than one NULL value. You cannot do what you want unless you move to Oracle.


这篇关于我想将空值放在两列之一中,这是我唯一的.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆