与主键有关的问题 [英] problem related to primary key

查看:119
本文介绍了与主键有关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好盖兹

是否可以为主键插入空值.
如果是,那么
请帮助我为主键插入空值.

hello guyzz

Is it possible to insert null value for primary key.
if yes then
plz help me to insert null value for primary key.

推荐答案

否.
"A table can have at most one primary key, but more than one unique key. A primary key is a combination of columns which uniquely specify a row. It is a special case of unique keys. One difference is that primary keys have an implicit NOT NULL constraint while unique keys do not."


Quote :

一个表只能有一个PRIMARY KEY约束,而参与PRIMARY KEY约束的列不能接受空值.由于PRIMARY KEY约束保证唯一的数据,因此经常在标识列中定义它们.

A table can have only one PRIMARY KEY constraint, and a column that participates in the PRIMARY KEY constraint cannot accept null values. Because PRIMARY KEY constraints guarantee unique data, they are frequently defined on an identity column.


主键约束 [


PRIMARY KEY Constraints[^]


这篇关于与主键有关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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