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

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -