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
Post a Comment