亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        一些工作和學(xué)習(xí)中經(jīng)常用到的sql語(yǔ)句

        字號(hào):


            一些常用地sql語(yǔ)句:
            新建表:
            create table [表名]
            (
            [自動(dòng)編號(hào)字段] int identity (1,1) primary key ,
            [字段1] nvarchar(50) default '默認(rèn)值' null ,
            [字段2] ntext null ,
            [字段3] datetime,
            [字段4] money null ,
            [字段5] int default 0,
            [字段6] decimal (12,4) default 0,
            [字段7] image null ,
            )
            新建表:
            create table [表名]
            (
            [自動(dòng)編號(hào)字段] int identity (1,1) primary key ,
            [字段1] nvarchar(50) default '默認(rèn)值' null ,
            [字段2] ntext null ,
            [字段3] datetime,
            [字段4] money null ,
            [字段5] int default 0,
            [字段6] decimal (12,4) default 0,
            [字段7] image null ,
            )
            刪除表:
            drop table [表名]
            插入數(shù)據(jù):
            insert into [表名] (字段1,字段2) values (100,'51windows.net')
            刪除數(shù)據(jù):
            delete from [表名] where [字段名]>100
            更新數(shù)據(jù):
            update [表名] set [字段1] = 200,[字段2] = '51windows.net' where [字段三] = 'haiwa'
            新增字段:
            alter table [表名] add [字段名] nvarchar (50) null
            刪除字段:
            alter table [表名] drop column [字段名]
            修改字段:
            alter table [表名] alter column [字段名] nvarchar (50) null
            重命名表:(access 重命名表,請(qǐng)參考文章:在access數(shù)據(jù)庫(kù)中重命名表)
            sp_rename '表名', '新表名', 'object'
            新建約束:
            alter table [表名] add constraint 約束名 check ([約束字段] <= '2000-1-1')
            刪除約束:
            alter table [表名] drop constraint 約束名
            新建默認(rèn)值
            alter table [表名] add constraint 默認(rèn)值名 default '51windows.net' for [字段名]
            刪除默認(rèn)值
            alter table [表名] drop constraint 默認(rèn)值名