Overview
In general, once the database structure has been designed, it cannot be easily changed because changes DDL (Data Definition Language) are expensive to operate, so you need to be cautious about database structure design.
However, business
Development Log: Add comments for tables and columns when creating a table in mySQL, and view comments for tables and columns.
Development Log: add notes for tables and columns when creating a mySQL table, and view the notes for tables and columns _
MySQL常用指令,java,php程序员,数据库工程师必备。程序员小冰常用资料整理MySQL common commands (for reference)The most common display commands are:1. Display the list of databases.show databases;2. Display the data table in the library:Use MySQL;Show tables;3, display the
MySQL adds, modifies, and deletes TABLE columns and constraints. TABLE definitions such as bitsCN. comALTER TABLE: adds, modifies, and deletes TABLE columns and constraints.
View column: desc table name;
Alter table t_book rename to bbb;
Add column:
ALTER table: Add, modify, delete table columns, constraints, and other table definitions.
View column: Desc table name;
Modify table name: ALTER TABLE T_book Rename to BBB;
Add column: ALTER TABLE name add column name varchar (30);
Delete column:
MySQL creates a table and creates a . frm file to save the table and column definitions. The index is stored in one . MYI (Myindex) and the data is stored in the . MYD (MYData) file extension. First, using Show/describe statement to display the data
When creating a table, MySQL creates a. frm file to save the table and column definitions. Indexes are stored in a file with the. MYI (MYindex) Extension and data is stored in a file with the. MYD (MYData) extension.
1. Use the SHOW/DESCRIBE
Alter table: add, modify, and delete TABLE columns, constraints, and other TABLE definitions.View column: desc table name;Alter table t_book rename to bbb;Add column: alter table name add column name varchar (30 );Delete column: alter table Name
ALTER table: Add, modify, delete table columns, constraints, and other table definitions.
View column: Desc table name;
Modify table name: ALTER TABLE T_book Rename to BBB;
Add column: ALTER TABLE name add column name varchar (30);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.