Reputation: 7348
any software or source code can used?
Upvotes: 0
Views: 1982
Reputation: 294387
Metadata about table structure is exposed in the Object Catalog Views:
select name from sys.columns where object_id = object_id('myTable');
Upvotes: 0
Reputation:
I'm not positive what you're asking, but you can query the SysColumns table to search for field names across all tables.
SELECT obj.Name [TableName], col.Name [ColumnName]
FROM SysColumns AS col
INNER JOIN SysObjects AS obj ON col.ID = obj.ID
AND obj.XType = 'U'
WHERE col.Name LIKE '%Price%'
Upvotes: 0
Reputation: 12379
use database_name
Sp_help table_name
This stored procedure gives all the details of column, their types, any indexes, any constraints, any identity columns and some good information for that particular table
.
Second method:
select column_name ‘Column Name’, data_type ‘Data Type’,
character_maximum_length ‘Maximum Length’ from
information_schema.columns where table_name = ‘table_name’
You can visit here for more details.
Upvotes: 1