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 Administration
 CREATING INDEXING

Author  Topic 

dlmagers10
Starting Member

48 Posts

Posted - 2010-11-22 : 10:07:34
Ok, Say you want to list the table name, column name, and data type for the columns named BOOK_CODE, TITLE, and PRICE. You need then ORDER the results by table name within column name. Being that column name is the major sort key and table name is the minor sort key.

I want to say it would be like this:

Using SQL Microsoft:

EXEC sp_column BOOK;

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-11-22 : 10:38:54
Is there a question here?
Homework?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-22 : 10:55:23
Have a look at information_schema.columns

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -