乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Mysql—數(shù)據(jù)庫管理與表管理

       路人甲Java 2022-09-09 發(fā)布于北京

      數(shù)據(jù)庫管理

      數(shù)據(jù)表管理

      三、刪除表:drop table 表名;

      四、修改表:alter table 表名 執(zhí)行動作

      1.修改表名:alter table 舊表名 rename 新表名;

      mysql> alter table student rename stu;

      2.添加字段:alter table 表名 add 字段名 數(shù)據(jù)類型 first | (after 字段名);

      mysql> ALTER TABLE 表名 ADD 屬性名1 數(shù)據(jù)類型 [完整性約束條件] [FIRST | AFTER 屬性名2];
      mysql> alter table student add aaa varchar(10);                 --最后一行
      mysql> alter table student add aaa varchar(10) not null default 0;
      mysql> alter table student add bbb varchar(10) first;           --第一行
      mysql> alter table student add bbb varchar(10) not null default 0 first;
      mysql> alter table student add ccc varchar(10) after name;      --name之后的一行
      mysql> alter table student add ccc varchar(10) not null default 0 after name;

      3.刪除字段:alter table 表名 drop 字段名;

      mysql> alter table student drop aaa;
      mysql> alter table student drop bbb;
      mysql> alter table student drop ccc;

      4.修改字段名稱:alter table 表名 change 舊字段名 新字段名 新數(shù)據(jù)類型; 

      mysql> alter table student change sex gender varchar(20);
      mysql> alter table student change sex gender int;
      

      5.修改字段類型:alter table 表名 modify 字段名 新數(shù)據(jù)類型(修改數(shù)據(jù)類型時會受到表中原有數(shù)據(jù)的限制)

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多