SQL UndoIndices, tables and databases are very important in php, this article will explain them.
SQL DROP INDEX statement
We can use the DROP INDEX commandto delete the index in the table.
Syntax for Microsoft SQLJet (and Microsoft Access):
DROP INDEX index_name ON table_name
Syntax for MS SQL Server:
DROP INDEX table_name.index_name
For IBM DB2 and Oracle Syntax:
DROP INDEX index_name
For MySQL Syntax:
ALTER TABLE table_name DROP INDEX index_name
SQL DROP TABLE statement
The DROP TABLE statement is used to delete a table (table structure, Attributes and indexes will also be deleted):
DROP TABLE table name
SQL DROP DATABASE statement
The DROP DATABASE statement is used to delete the database:
DROP DATABASE database name
SQL TRUNCATE TABLE statement
If we only need to remove the data in the table, but do not delete the table itself, then what should we do? Woolen cloth?
Please use the TRUNCATE TABLE command (only delete the data in the table):
TRUNCATE TABLE table name
This article is related to SQL undoing indexes, tables and databases The knowledge is explained. For more learning materials, please pay attention to the php Chinese website to view.
Related recommendations:
Related knowledge about SQL DEFAULT constraints
Related knowledge about SQL CHECK constraints
The above is the detailed content of Knowledge about SQL undo indexes, tables and databases. For more information, please follow other related articles on the PHP Chinese website!