SQL server 2000: I'm told I need to define a clustered key on an existing table Scores for the rows absID and revID.
what is the syntax for this? I'm looking online but not finding it.
thanks.
DaveYour best bet is to open up Query Analyzer, then hit F1.
Then search for "clustered index key"
BOL is your FRIEND.|||Do it through Enterprise Manager.
Right-click on the table and select "Design Table".
From the menu-bar, click the icon for "Manager Indexes/Keys" (second from right, normally).
Click "New" to create a new index. Select the column(s) you want to include, and check off the box for "Create as clustered". Save and exit.
Who told you the table needed this clustered index? Does the table have a primary key? (Normally the primary key is the clustered index.)
Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts
Wednesday, March 7, 2012
Friday, February 24, 2012
Default values
Is there a way to check to see if a default value exists for an existing
column in a table using SQL script? If so, how?http://www.aspfaq.com/2177
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Robert" <netsec4u@.hotmail.com> wrote in message
news:OHQx#K9eEHA.2804@.TK2MSFTNGP11.phx.gbl...
> Is there a way to check to see if a default value exists for an existing
> column in a table using SQL script? If so, how?
>|||SELECT column_default
FROM information_schema.columns
WHERE table_name = 'TABLE_NAME'
AND column_name = 'COLUMN_NAME'
--
David Portas
SQL Server MVP
--
column in a table using SQL script? If so, how?http://www.aspfaq.com/2177
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Robert" <netsec4u@.hotmail.com> wrote in message
news:OHQx#K9eEHA.2804@.TK2MSFTNGP11.phx.gbl...
> Is there a way to check to see if a default value exists for an existing
> column in a table using SQL script? If so, how?
>|||SELECT column_default
FROM information_schema.columns
WHERE table_name = 'TABLE_NAME'
AND column_name = 'COLUMN_NAME'
--
David Portas
SQL Server MVP
--
Subscribe to:
Posts (Atom)