/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [name]
,[object_id]
,[principal_id]
,[schema_id]
,[parent_object_id]
,[type]
,[type_desc]
,[create_date]
,[modify_date]
,[is_ms_shipped]
,[is_published]
,[is_schema_published]
,[lob_data_space_id]
,[filestream_data_space_id]
,[max_column_id_used]
,[lock_on_bulk_load]
,[uses_ansi_nulls]
,[is_replicated]
,[has_replication_filter]
,[is_merge_published]
,[is_sync_tran_subscribed]
,[has_unchecked_assembly_data]
,[text_in_row_limit]
,[large_value_types_out_of_row]
,[is_tracked_by_cdc]
,[lock_escalation]
,[lock_escalation_desc]
FROM [SaleSystem].[sys].[tables]
این کد اسم جدولها رو بر میگردونه. از اینجا OBJECT_ID رو بردار و یک کوئری این جور بزن:
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [object_id]
,[name]
,[column_id]
,[system_type_id]
,[user_type_id]
,[max_length]
,[precision]
,[scale]
,[collation_name]
,[is_nullable]
,[is_ansi_padded]
,[is_rowguidcol]
,[is_identity]
,[is_computed]
,[is_filestream]
,[is_replicated]
,[is_non_sql_subscribed]
,[is_merge_published]
,[is_dts_replicated]
,[is_xml_document]
,[xml_collection_id]
,[default_object_id]
,[rule_object_id]
,[is_sparse]
,[is_column_set]
FROM [SaleSystem].[sys].[columns]
WHERE object_id=21575115