Sql server 2008 的基础常识总结(国外英语资料).doc

Sql server 2008 的基础常识总结(国外英语资料).doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Sql server 2008 的基础常识总结(国外英语资料)

Sql server 2008 的基础知识总结 Sql server 2008 basics summary Finished by sina weibo@marmatt SQL statements add columns, modify column types, modify columns, and delete columns. The change statement for the database SQL language can be used to modify the base table, which is typically formatted as: ALTER TABLE TABLE name [changing mode] Change the way: ? ADD a column: ADD column 1 column 1 Delete a column: DROP column 1 ? CHANGE the name of the column: CHANGE, new column name, new column name. Change the column name: MODIFY column 1 new data type As you can see, modifying the base table provides the following four changes: (1) the ADD: To add new columns and integrity constraints, the columns are defined in the same way as the columns in the CREARE TABLE statement, whose syntax format: ALTER TABLE TABLE name ADD column definition | integrity constraint . Because the new column added in this method automatically fills NULL values, you cannot specify NOT NULL constraints for the new columns that are added. (2) the DROP: To delete the specified integrity constraint, or the specified column, whose syntax is: ALTER TABLE TABLE name DROP [] ALTER TABLE TABLE name DROP COLUMN COLUMN name Note: some database systems do not allow this to delete columns in the database table (DROP COLUMN COLUMN name ). (3) CHANGE the way Used to modify certain columns in their syntax format: ALTER TABLE [TABLE name] CHANGE TO new column name new column data type - is wrong The EXECUTE sp_rename N dbo. Student table. Name, N name, COLUMN - correct (4) the MODIFY way For modifying the data types of certain columns, the syntax format: ALTER TABLE [TABLE name] [column name] [data type] Note: all MSSQL systems have their own functions (1) date and time type -datatime accuracy is three hundredths of a second The alter table student table Add creation time datetime default getdate () Insert into student form (student class, student name, student age, teacher number) values ( class , 7,

文档评论(0)

jgx3536 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档