sql - How to get only column names as the following sample? -


currently, have string of column names below (this string computed in stored pro, , column name got several tables):

@str = 'select fieldname1, fieldname2, fieldname3' 

in stored, how can return datatable no data , @str list of column name? tried query that:

exec (@str) 

but requires table it. don't want put table because query data, , take long time finish.

put 'null' in front of each column name, in:

select null fieldname1, null fieldname2, null fieldname3 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -