資料庫物件(注釋)

2021-10-21 18:18:00 字數 732 閱讀 7871

定義:

對錶本身或表中的每個字段新增一段解釋說明,使得初次接觸該錶的開發人員能盡快了解該錶。

體現:1.表結構描述中

2.查詢結果某行資料縱向展示時

注釋列:

建立注釋:

comment on column tb_name.col_name is '注釋內容』;

修改注釋:

comment on column tb_name.col_name is '新的注釋內容』;

刪除注釋:

comment on column tb_name.col_name is 『』;

注釋表:

建立注釋:

comment on table tb_name is '新的注釋內容』;

修改注釋:

comment on table tb_name is 『新的注釋內容』;

刪除注釋:

comment on table tb_name is 『』;

注意點:

1.注釋內容是字元型的,注意加英文單引號

2.刪除注釋時用的『』不能替換為null

3.新增注釋時只能乙個乙個新增

4.使用create table tb_name as select … 建立表時注釋會被忽略

select * from user_tab_comments; --表注釋資訊

select * from user_col_comments; --列注釋資訊

資料庫約束注釋

增加check 約束 alter table staffinfo table name addconstraint chk position 約束名 check position 列名 in chairman manager staff 約束條件 增加外來鍵約束 alter table staffi...

注釋資料庫介紹之GO KEGG資料庫

做過測序的小夥伴肯定都知道go kegg資料庫,我們想要知道基因發揮什麼功能 參與什麼途徑,就一定要看基因功能注釋的結果,而go kegg這兩個資料庫是基因功能注釋常用的資料庫,也是常常出現在測序文章中,但是你真的了解這兩個資料庫嗎?go資料庫 1 go資料庫的命名 go gene ontology...

資料庫物件

1表 資料庫中的表與我們日常生活中使用的 類似,它也是由行 row 和列 column 組成的。列由同類的資訊組成,每列又稱為乙個字段,每列的標題稱為欄位名。行包括了若干列資訊項。一行資料稱為乙個或一條記錄,它表達有一定意義的資訊組合。乙個資料庫表由一條或多條記錄組成,沒有記錄的表稱為空表。每個表中...