sql的一个小问题

guanzx 2009-05-23 01:09:59
TITLE(Name, ISBN, CallNumber, Year, AuthorFName, AuthorLName);
PK(CallNumber)


Add the constraint that ISBN and Name fields are alternate keys in the TITLE table and that they cannot take a NULL value

应该怎么写?
...全文
117 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
csdyyr 2009-05-23
  • 打赏
  • 举报
回复
alter table TITLE
alter column ISBN varchar(100) not null

alter table TITLE
alter column Name varchar(100) not null

alter table TITLE
add constraint alt_key unique(ISBN,Name)

22,294

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧