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.
| Author |
Topic |
|
kvishnuprasad
Starting Member
13 Posts |
Posted - 2008-06-27 : 11:44:43
|
| HI I have a table with the name BMC_BMC_HardwareSystemComponent_adn i tried "sp_help BMC_BMC_HardwareSystemComponent_"it gives anerror can any one tell me whats the problem.same with "sp_help User"Regards,Vishnu |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-27 : 11:48:50
|
| What are you trying to do? |
 |
|
|
kvishnuprasad
Starting Member
13 Posts |
Posted - 2008-06-27 : 11:51:26
|
| I want to see all the column names of table "User" and "BMC_BMC_HardwwareSystemComponent_", |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-27 : 11:55:49
|
| You can see all informations with sp_help 'tablename' |
 |
|
|
kvishnuprasad
Starting Member
13 Posts |
Posted - 2008-06-27 : 11:59:36
|
| Yeah I can see for all the tables except for few where they ahave a big table name |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-27 : 12:02:04
|
quote: Originally posted by kvishnuprasad Yeah I can see for all the tables except for few where they ahave a big table name
so what that doesnt matter. you can still run sp_help on them |
 |
|
|
kvishnuprasad
Starting Member
13 Posts |
Posted - 2008-06-28 : 09:52:57
|
| sp_help doesnot work if the table name is more than 30 chars..any help?????? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-28 : 13:47:13
|
quote: Originally posted by kvishnuprasad sp_help doesnot work if the table name is more than 30 chars..any help??????
i dont think there's such a problem. what was your table name? what error did you get when you used sp_help? |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-28 : 14:51:18
|
| It will list all columns of all tables in your database:SELECT ST.Name,SM.NAMEFROM SYS.OBJECTS ST INNER JOIN SYS.COLUMNS SMON ST.OBJECT_ID = SM.OBJECT_ID WHERE ST.TYPE = 'U' ORDER BY ST.NAME, SM.NAME |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-28 : 22:50:16
|
| Or just query information_schema.columns. |
 |
|
|
|
|
|