sql server 2005使用alter命令 [英] sql server 2005 using the alter command
本文介绍了sql server 2005使用alter命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一份过去的试卷,但我没有答案,任何人都可以告诉我这是否正确.
问题是:将AU_ID和ISBN用作BOOK_AUTHOR表的主键
我的回答:ALTER TABLE BOOK_AUTHOR
添加约束PK_BOOK_AUTHOR聚集主键(AU_ID),(ISBN)
I am doing a past exam paper and i don''t have the answer, can anyone tell me if this is correct.
The Question is : Make the AU_ID and the ISBN the Primary Key of the BOOK_AUTHOR table
My answer : ALTER TABLE BOOK_AUTHOR
ADD CONSTRAINT PK_BOOK_AUTHOR Primary Key CLUSTERED (AU_ID),(ISBN)
推荐答案
这是正确的查询.
Here is the correct query that works.
ALTER TABLE BOOK_AUTHOR ADD CONSTRAINT PK_BOOK_AUTHOR Primary Key CLUSTERED (AU_ID,ISBN)
这篇关于sql server 2005使用alter命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文