Current location - Health Preservation Learning Network - Healthy weight loss - The sql command to delete the database is
The sql command to delete the database is
mysqladmin

The sql command to delete the database is

mysqladmin .

There are two ways to delete a database in SQLServer:; Delete through administrative tools; First open SQLServerManagementStudio and connect to the database server. ; Then find the target database (to be deleted), and right click → Delete;

In the pop-up window, select the object to be deleted and set relevant properties, and then click OK to delete it. ; Delete the database through the query analyzer; Click New Query → Enter DropDatabasedname”→ Right click → Execute. ; Then, you can see the execution results in the message window below.

The command to delete data is

1, delete (delete table)

Delete content and definitions to free up space. Simply put, the whole table is deleted. It is impossible to add data in the future unless a new table is added.

The drop statement will delete the constraints and trigger indexes on which the table structure depends; Stored procedures/functions that depend on this table will be preserved, but their status will become: invalid.

2. Truncation (clearing the data in the table)

Delete content, free up space, but do not delete definition (keep the data structure of the table). Unlike drop, it just clears the table data.

3. Delete (delete the data in the table)

The delete statement is used to delete rows in a table. The delete statement deletes one row at a time from the table, and at the same time, the delete operation of this row is saved as a transaction record in the log for rollback operation.