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 |
Yong Ji
Starting Member
5 Posts |
Posted - 2007-10-16 : 17:21:21
|
HiIs there a way to find out result clomn list of a SP?For exampleIf there's a SP like followingcreate proc jy_testasbegin select col1, col2 from tabAendI'd like to know col1 and col2 will be returned from the SP and if possible, I also like to know the data type of those.Thank you in advance. |
|
Kristen
Test
22859 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-17 : 02:48:28
|
select * from information_schema.routine_columns where routine_name='your sp name'MadhivananFailing to plan is Planning to fail |
 |
|
Yong Ji
Starting Member
5 Posts |
Posted - 2007-10-17 : 03:09:36
|
The following is definition of the routine_columns view.Contains one row for each column returned by the table-valued functions accessible to the current user in the current database.So it doesn't have the information for the SP.quote: Originally posted by madhivanan select * from information_schema.routine_columns where routine_name='your sp name'MadhivananFailing to plan is Planning to fail
|
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-10-17 : 03:54:24
|
Did you try the links I provided? |
 |
|
Yong Ji
Starting Member
5 Posts |
Posted - 2007-10-17 : 04:39:43
|
Yes, thank you for the valuable information.I think I got an idea.quote: Originally posted by Kristen Did you try the links I provided?
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-17 : 04:50:50
|
quote: Originally posted by Yong Ji The following is definition of the routine_columns view.Contains one row for each column returned by the table-valued functions accessible to the current user in the current database.So it doesn't have the information for the SP.quote: Originally posted by madhivanan select * from information_schema.routine_columns where routine_name='your sp name'MadhivananFailing to plan is Planning to fail
Yes I think I have given you the wrong query MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|