新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
SQLServer創(chuàng)建表所要用到的代碼
以下的文章主要向大家講述的是SQL Server創(chuàng)建表的實際操作過程中所要用到的代碼,對于SQL Server數(shù)據(jù)庫的表的創(chuàng)建在實際操作中是經(jīng)常出現(xiàn)的,以下的文章就是向大家描述的是其實際應(yīng)用代碼。

樂業(yè)網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)建站,樂業(yè)網(wǎng)站設(shè)計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為樂業(yè)1000多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)要多少錢,請找那個售后服務(wù)好的樂業(yè)做網(wǎng)站的公司定做!
- Sql代碼
- use library
- --創(chuàng)建表Readers
- create table Readers
- (
- RID int identity(1,1),
- RName varchar(20) not null,
- RAge int,
- RSex bit ,
- RAddress varchar(50)
- )
- use library
- --創(chuàng)建表Readers
- create table Readers
- (
- RID int identity(1,1),
- RName varchar(20) not null,
- RAge int,
- RSex bit ,
- RAddress varchar(50)
- )
這里我們看到了格式:字段名稱 字段類型 [字段屬性]。字段屬性包括identity和not null兩個,就這兩個。有時候字段后面會跟上default(),但是它不是字段屬性,它是字段的約束。default約束也是五個約束中***的一個設(shè)置方式不同的一個。關(guān)于約束我們下面會看。
以上的相關(guān)內(nèi)容就是對SQL Server創(chuàng)建表的代碼介紹,望你能有所收獲。
本文題目:SQLServer創(chuàng)建表所要用到的代碼
URL標題:http://m.fisionsoft.com.cn/article/ccseepj.html


咨詢
建站咨詢
