In SQL SERVER the
SP_HELP 'table_name'
returns a description of each column including it's type, length, nullable state etc. I'm using this info to auto-generate DTOs (classes) and mappings.
If I want to do this for an inline SQL statement (which includes aliases, joins etc.) I create a view temporarily with the definition being my SQL statement and then run sp_help for this view - which gives me all I need. After that I just delete the view.
The question:
Is there any other - simpler way of getting this info for inline SQL - preferably without going through the view creation?