oracle添加字段sql MySQL給字段添加注釋?
MySQL給字段添加注釋?在MySQL數據庫中,字段或列注釋與屬性注釋一起添加。在創建新表的腳本中,可以通過在字段定義腳本中添加comment屬性來添加注釋。示例代碼如下:create table t
MySQL給字段添加注釋?
在MySQL數據庫中,字段或列注釋與屬性注釋一起添加。在創建新表的腳本中,可以通過在字段定義腳本中添加comment屬性來添加注釋。示例代碼如下:create table test(id int not null default 0 comment “user id”)如果是生成表,還可以使用命令修改字段,然后添加comment屬性定義來添加注釋。示例代碼如下:alter table testrange column id int not null default 0 comment“test table id”您已經知道如何向表的字段或列添加注釋,那么如何查看現有表的所有字段的注釋?您可以使用以下命令查看:show full columns from table,例如:show full columns from test
方法2:alter table tablename auto increment=0