Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 script vs. query

Author  Topic 

mallorz4
Starting Member

27 Posts

Posted - 2014-01-31 : 20:37:42
Hi everyone,

I am trying to begin an assignment for school but am thrown off by the first problem ... go figure.

We are to write a script that adds an index to a particular table/field.

This is different than a query, correct? How to I simply (manually) create a script? I you can right click on the database - Tasks - Generate Scripts, but that seems to generate a lot of fluff. I also seen the option to right click on the specific table and Script Table As, however Alter To is not available.

What is the correct way to approach this? Just looking to be pointed in the right direction here, not quite sure where/how to start.

Thank you.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-01-31 : 20:45:24
basically you need to use the CREATE INDEX statement to do it


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

mallorz4
Starting Member

27 Posts

Posted - 2014-01-31 : 20:47:18
Okay. So to me that looks like a query. I'll continue with that.

Thanks again.
Go to Top of Page
   

- Advertisement -