DB2中怎么设置主键

DB2中怎么设置主键,第1张

创建表时指胡亮定primary key,如:

create table mytab(id int not null primary key,

name char(10)

)

注意,not null 不可省略,必档陵须与primary key 同时指定裤蠢宽!

create

table

tabname(col1

type1

[not

null]

[primary

key],col2

type2

[not null],..)


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11994929.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存