<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                |作用|語句| |--|--| |禁止所有表約束的SQL|select 'alter table '+name+' nocheck constraint all' from sysobjects where type='U'| |刪除所有表數據的SQL|select 'TRUNCATE TABLE '+name from sysobjects where type='U'| |恢復所有表約束的SQL|select 'alter table '+name+' check constraint all' from sysobjects where type='U'| |刪除某字段的約束|declare @name varchar(100)<br/>--DF為約束名稱前綴<br/>select @name=b.name from syscolumns a,sysobjects b where a.id=object_id('表名') and b.id=a.cdefault and a.name='字段名' and b.name like 'DF%'<br>--刪除約束<br/>alter table 表名 drop constraint @name<br/>--為字段添加新默認值和約束<br/>ALTER TABLE 表名 ADD CONSTRAINT @name DEFAULT (0) FOR [字段名]| |--DF為約束名稱前綴|select @name=b.name from syscolumns a,sysobjects b where a.id=object_id('表名') and b.id=a.cdefault and a.name='字段名' and b.name like 'DF%'| |--刪除約束|alter table 表名 drop constraint @name| |--為字段添加新默認值和約束|ALTER TABLE 表名 ADD CONSTRAINT @name DEFAULT (0) FOR [字段名]| |--刪除約束|ALTER TABLE tablename Drop CONSTRAINT 約束名| |--修改表中已經存在的列的屬性(不包括約束,但可以為主鍵或遞增或唯一)|ALTER TABLE tablename alter column 列名 int not null| |--添加列的約束|ALTER TABLE tablename ADD CONSTRAINT DF_tablename_列名 DEFAULT(0) FOR 列名| |--添加范圍約束|alter table tablename add check(性別 in ('M','F'))|
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看