如何在SQL中删除索引

在SQL中如何删除索引

DROP INDEX 语句用于删除索引。

创建索引的语句

USE vipendra

GO
-- Create a new table with three columns.
CREATE TABLE dbo.studentinfo
  (s_id int NOT NULL,

   s_name nchar(10) NULL,
   s_address nvarchar(50) NULL);
GO
-- Create a clustered index called student_index

-- on the dbo.TestTable table using the TestCol1 column.
CREATE CLUSTERED INDEX student_index
  ON dbo.studentinfo (s_id);
GO

SQL删除索引语句

USE vipendra;
GO
-- delete the student_index index

-- from the dbo.student table
DROP INDEX student_index
  ON dbo.studentinfo
GO
日期:2020-06-02 22:17:54 来源:oir作者:oir