• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦>學習英語>專業英語>計算機英語>

    數據庫中alter的用法

    時間: 長思709 分享

      數據庫中alter的用法的用法你知道嗎?下面小編就跟你們詳細介紹下數據庫中alter的用法的用法,希望對你們有用。

      數據庫中alter的用法的用法如下:

      To add a column to an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      ADD column_name column-definition;

      For example:

      ALTER TABLE supplier

      ADD supplier_name varchar2(50);

      This will add a column called supplier_name to the supplier table.

      Syntax #2

      To add multiple columns to an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      ADD ( column_1 column-definition,

      column_2 column-definition,

      ...

      column_n column_definition );

      For example:

      ALTER TABLE supplier

      ADD ( supplier_name varchar2(50),

      city varchar2(45) );

      This will add two columns (supplier_name and city) to the supplier table.

      Modifying column(s) in a table

      Syntax #1

      To modify a column in an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      MODIFY column_name column_type;

      For example:

      ALTER TABLE supplier

      MODIFY supplier_name varchar2(100) not null;

      This will modify the column called supplier_name to be a data type of varchar2(100) and force the column to not allow null values.

      Syntax #2

      To modify multiple columns in an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      MODIFY ( column_1 column_type,

      column_2 column_type,

      ...

      column_n column_type );

      For example:

      ALTER TABLE supplier

      MODIFY ( supplier_name varchar2(100) not null,

      city varchar2(75) );

      This will modify both the supplier_name and city columns.

      Drop column(s) in a table

      Syntax #1

      To drop a column in an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      DROP COLUMN column_name;

      For example:

      ALTER TABLE supplier

      DROP COLUMN supplier_name;

      This will drop the column called supplier_name from the table called supplier.

      Rename column(s) in a table

      (NEW in Oracle 9i Release 2)

      Syntax #1

      Starting in Oracle 9i Release 2, you can now rename a column.

      To rename a column in an existing table, the ALTER TABLE syntax is:

      ALTER TABLE table_name

      RENAME COLUMN old_name to new_name;

      For example:

      ALTER TABLE supplier

      RENAME COLUMN supplier_name to sname;

      This will rename the column called supplier_name to sname.

    數據庫中alter的用法

    數據庫中alter的用法的用法你知道嗎?下面小編就跟你們詳細介紹下數據庫中alter的用法的用法,希望對你們有用。 數據庫中alter的用法的用法如下: To add a column to an existing table, the ALTER TABLE syntax is: ALTER TABLE table
    推薦度:
    點擊下載文檔文檔為doc格式
    543128 主站蜘蛛池模板: 免费人成再在线观看网站| 天天干视频在线| 国产做无码视频在线观看| 久久黄色免费网站| 黄网站色在线视频免费观看| 欧美成人一区二区三区| 国产青榴视频在线观看| 亚洲片在线观看| 67194在线看片| 欧美成人精品高清在线观看| 国产精品视频免费一区二区| 亚洲最大看欧美片网站| 69堂午夜精品视频在线| 欧美日韩国产一区三区| 国产精品无打码在线播放| 亚洲国产成人久久综合一| 怡红院亚洲怡红院首页| 欧美一区二区三区四区视频| 国产漂亮白嫩美女在线观看| 亚洲av网址在线观看| 亚洲免费色视频| 亚洲自国产拍揄拍| 看全免费的一级毛片| 婷婷免费高清视频在线观看| 伊人久久波多野结衣中文字幕 | 久久天天躁狠狠躁夜夜2020一| 黄在线观看网站| 日本乱人伦中文在线播放| 四虎影视永久在线观看| 丁香六月综合网| 激情欧美日韩一区二区| 国产精品白浆无码流出| 亚洲AV综合色区无码二区偷拍| 麻麻张开腿让我爽了一夜黄文| 无码专区久久综合久中文字幕| 免费观看美女裸体网站| 99久热只有精品视频免费观看17 | 噼里啪啦免费观看高清动漫| 一本大道道无香蕉综合在线| 狠狠精品久久久无码中文字幕| 国产自产视频在线观看香蕉|