WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

SQL DROP INDEX, DROP TABLE, and DROP DATABASE


In SQL, Indexes, tables, and databases can without much of a stretch be erased/evacuated with the DROP statement.


The DROP INDEX Statement

The DROP INDEX proclamation is utilized to erase a record in a database.

DROP INDEX Syntax for MS Access:

DROP INDEX index_name ON table_name

DROP INDEX Syntax for MS SQL Server:

DROP INDEX table_name.index_name

DROP INDEX Syntax for DB2/Oracle:

DROP INDEX index_name

DROP INDEX Syntax for MySQL:

Change TABLE table_name DROP INDEX index_name

The DROP TABLE Statement

The DROP TABLE articulation is utilized to erase a table.

DROP TABLE table_name

The DROP DATABASE Statement

The DROP DATABASE articulation is utilized to erase a database.

DROP DATABASE database_name

The TRUNCATE TABLE Statement

What on the off chance that we just need to erase the information inside the table, and not the table itself?

Then, utilize the TRUNCATE TABLE statement:

TRUNCATE TABLE table_name