可以使用任何软件或源代码吗?
答案 0 :(得分:1)
使用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
。
第二种方法:
select column_name ‘Column Name’, data_type ‘Data Type’,
character_maximum_length ‘Maximum Length’ from
information_schema.columns where table_name = ‘table_name’
您可以访问here了解详情。
答案 1 :(得分:0)
我不是肯定你在问什么,但你可以查询SysColumns表来搜索所有表中的字段名称。
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%'
答案 2 :(得分:0)
有关表结构的元数据公开在Object Catalog Views:
中select name from sys.columns where object_id = object_id('myTable');