1.查詢表所有字段的屬性:
SELECT * From INFORMATION_SCHEMA.COLUMS Where
TABLE_SCHEMA= '庫名' AND TABLE_NAME = '表名'
2.新增表字段:
alter table 表名 add 字段名稱 類型 not null
3.修改表字段屬性:
alter table 表名 alter column 字段名稱 類型 not null
1.查詢表所有字段的屬性:
SELECT * From INFORMATION_SCHEMA.COLUMS Where
TABLE_SCHEMA= '庫名' AND TABLE_NAME = '表名'
2.新增表字段:
alter table 表名 add 字段名稱 類型 not null
3.修改表字段屬性:
alter table 表名 alter column 字段名稱 類型 not null