How to Drop (Delete) a Table in SQL
Автор: Laurence Tindall
Загружено: 2024-11-24
Просмотров: 221
Описание:
In today’s tutorial, I’m going to show you how to drop a table in SQL.
Please note, dropping a table in SQL not only deletes the table, but also all the rows of data within the table, so please use this feature cautiously.
To get started:
1. Open up SQL server, and expand the databases folders, and then the folder for the database you’d like to drop the table from.
2. Now, expand the “Tables” folder.
3. From here, identify the table that you would like to drop.
4. For today’s example, I’m going to be dropping the “Employees” table.
5. To drop this table, right click on the database folder, and select “New Query”.
6. Now from the query window, type in the following “DROP TABLE”, then the name of the table, which in my example is called “employees”. Now add a semicolon “;”.
7. Now click on the “Execute” button.
8. You’ll now see a confirmation message below, and if we look at the tables folder in the object explorer, you can see that the table has been dropped.
And it’s as easy as that, dropping a table in SQL is an easy task to perform.
#sql #droptable #database
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: