The following articles mainly describe the actual operation steps of the MySQL command to view the table structure. The detailed analysis of the specific solution is as follows, it is expected that you will be able to learn the actual operation commands for viewing table structures in MySQL in the future. The following describes the main content of the text. As follows: desc table name; showcolumnsfrom table name; describe table name;
The following articles mainly describe the actual operation steps of the MySQL command to view the table structure. The detailed analysis of the specific solution is as follows, it is expected that you will be able to learn the actual operation commands for viewing table structures in MySQL in the future. The following describes the main content of the text. As follows: desc table name; showcolumnsfrom table name; describe table name;
The following articles mainly describe the actual operation steps of the MySQL command to view the table structure. The detailed analysis of the specific solution is as follows, it is expected that you will be able to learn the actual operation commands for viewing table structures in MySQL in the future. The following describes the main content of the text.
As follows:
- Desc table name;
- Show columns from table name;
- Describe table name;
- Show create table name;
- Use information_schema
- Select * from columns where table_name = 'table name ';
By the way:
- show databases;
Use Database Name;
- show tables;
MySQL command to view table structure: the original unique index AK_PAS_Name (PAC_Name) in the table tb_webparamcounter, run the following SQL to modify the index
- alter table tb_webparamcounter drop index AK_PAS_Name;
- alter table tb_webparamcounter add UNIQUE AK_PAS_Name(PC_ID,PAC_Name);
If you find that the index logic is incorrect, you need to add another field to execute
Note: The PC_ID, PAC_Name, and PAC_Value fields are not FOREIGN keys. Otherwise, you must drop foreign key and redo the previous step.
View the stored procedure;
- show procedure status;
By the way, oracle
- select * from v$database;
- select * from all_users;
- select * from user_tables;
The above content is an introduction to the MySQL table structure command. I hope you will get something.