sql server - Get columns and types for all tables -


i need table names , column types sys.columns. tried this:

select object_id    sys.columns  

but object_id gives value , not exact name.

you can use object_name() function name of object given object_id.

and can join onto sys.types view type name:

select c.object_id, object_name(c.object_id), c.name, t.name sys.columns c join sys.types t on t.system_type_id = c.system_type_id; 

Comments

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -