SQL Server/T-SQL/System/sp helpindex — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:20, 26 мая 2010
Define primary key in table creation
3> CREATE TABLE customer
4> (
5> cust_id int IDENTITY NOT NULL,
6> cust_name varchar(30) NOT NULL,
7> CONSTRAINT customer_PK PRIMARY KEY (cust_id)
8> )
9> GO
1>
2> EXEC sp_helpindex customer
3> GO
index_name index_description
index_keys
-------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------
customer_PK clustered, unique, primary key located on PRIMARY
cust_id
1>
2> drop table customer;
3> GO
1>