View the structure of the table and Alter table

来源:互联网 发布:女博士杀人 知乎 编辑:程序博客网 时间:2024/06/02 04:22
1 the command to view the structure of the table.

The structure of a table can be viewed using the DESCRIBE TABLE_NAME command. This command shows the entire schema of the table.

2 the limitation of alter command

ALTER Command supports only the RENAME TABLE and ADD COLUMN variants. Other kinds of ALTER TABLE operations such as DROP COLUMN, ALTER COLUMN, ADD CONSTRAINT are omitted

Alter Table command is a DDL command that is used to change the definition of the table. Changing definition means changing datatype, width of columns or adding a new column in the table.

Column can’t be deleted with alter command.
Column can’t be renamed a column.
Column can’t be added in between of the existing columns.
When a column is added, it will be added at the end of the table.

原创粉丝点击