3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
MySQL 寫入/讀取 資料表 與 欄位 註解 內容 資料來源:http://fannys23.pixnet.net/blog/post/30008933   01.建立註解語法:     CREATE TABLE 資料表名稱 (             欄位名稱 資料型別 欄位定義 COMMENT ‘欄位註解內容’,             …     ) COMMENT ‘資料表註解內容’;     ex:     CREATE TABLE IF NOT EXISTS `authorization_group_detailed` (       `authorization_group_id` int(11) DEFAULT NULL,       `data_id` int(11) DEFAULT NULL,       `data_type` int(11) DEFAULT NULL COMMENT ‘[1]->door_group,[2]->door,[-1]->card_group,[-2]->card’,       `state` int(11) NOT NULL DEFAULT ‘1’     ) ENGINE=MyISAM DEFAULT CHARSET=utf8;          02.取得註解          方法1:直接匯出SQL即可    [我都用這個方法,因為我笨]     方法2:使用phpmyadmin的列印預覽     方法3:SQL         — 資料表註解             select table_schema, table_name, table_comment             from information_schema.tables             where table_schema=‘資料庫名稱’;         — 資料欄位註解             select table_name, column_name, column_type, column_key, extra, column_comment             from information_schema.columns             where table_schema=‘資料庫名稱’;         ex:         select table_name, column_name, column_type, column_key, extra, column_comment         from information_schema.columns         where table_schema=‘test’;        

本文由jashliaoeuwordpress提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦