自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

SQL中Drop刪除表命令解析

數(shù)據(jù)庫 SQL Server
如果您才接觸SQL不久,SQL的各種命令是一定需要掌握的,下面為您介紹SQL命令中的Drop刪除表,供您參考,希望對您有所幫助。

如果您才接觸SQL不久,SQL的各種命令是一定需要掌握的,下面為您介紹SQL命令中的Drop刪除表,供您參考,希望對您有所幫助。

Drop Index
取消索引
You can delete an existing index in a table with the DROP INDEX statement.
你可以將現(xiàn)有的索引通過DROP INDEX語句進行取消操作。

Syntax for Microsoft SQLJet (and Microsoft Access):
在Microsoft SQLJet (和 Microsoft Access)中的語法是這樣的:

DROP INDEX index_name ON table_name

Syntax for MS SQL Server:
MS SQL Server的語法是這樣:

DROP INDEX table_name.index_name

Syntax for IBM DB2 and Oracle:
IBM DB2和Oracle的語法為:

DROP INDEX index_name

Syntax for MySQL:
MySql則是這樣:

ALTER TABLE table_name DROP INDEX index_name

--------------------------------------------------------------------------------

Delete a Table or Database
刪除一張表或是一數(shù)據(jù)庫
To delete a table (the table structure, attributes, and indexes will also be deleted):
刪除一張表(表中的數(shù)據(jù)結(jié)構(gòu),屬性以及索引也會被刪除):

DROP TABLE table_name

To delete a database:
要刪除一個數(shù)據(jù)庫的話可以這樣寫:

DROP DATABASE database_name
 
--------------------------------------------------------------------------------

Truncate a Table
截表
What if we only want to get rid of the data inside a table, and not the table itself? Use the TRUNCATE TABLE command (deletes only the data inside the table):
當(dāng)我們只想將表內(nèi)的數(shù)據(jù)做完成清楚而保留其內(nèi)部結(jié)構(gòu)的話,可以使用TRUNCATE TABLE命令(僅僅刪除表中的數(shù)據(jù))

TRUNCATE TABLE table_name
 

責(zé)任編輯:段燃 來源: IT加油站
相關(guān)推薦

2010-09-01 16:47:18

SQL刪除

2010-09-02 11:34:51

SQL刪除

2010-11-11 09:20:46

SQL Server創(chuàng)

2024-10-22 17:04:31

2011-03-21 15:40:31

Oracle

2009-04-20 15:54:04

SQL Server重復(fù)行

2010-11-11 10:03:58

SQL Delete命

2010-06-28 12:46:09

SQL Server

2010-09-02 10:53:21

SQL刪除

2010-09-02 10:36:51

SQL刪除

2010-09-02 16:28:03

SQL刪除

2010-11-10 11:37:29

SQL Server刪

2010-10-22 16:48:49

SQL刪除所有表數(shù)據(jù)

2021-10-12 06:56:05

MYSQLDeleteDrop

2010-09-02 09:51:24

SQL刪除

2010-09-03 13:30:31

SQL刪除

2010-09-02 11:38:44

SQL刪除

2010-09-14 13:30:28

sql server備

2010-09-01 15:30:24

SQL刪除

2010-08-04 09:55:34

LINQ to SQL
點贊
收藏

51CTO技術(shù)棧公眾號