---------------------------------------------------------- select ALL Tables SELECT [name], [id] FROM [TWPPROD].[dbo].[sysobjects] where [type]='U' and (name like 'TBL_CUST%' OR name like 'TBL_ORDER%' OR name like 'TBL_PRODUCT%' ) ORDER BY NAME ---------------------------------------------------------- select ALL PRIMARY KEY SELECT [name], [id], [xtype], [uid], [info], [status], [base_schema_ver], [replinfo], [parent_obj], [crdate], [ftcatid], [schema_ver], [stats_schema_ver], [type], [userstat], [sysstat], [indexdel], [refdate], [version], [deltrig], [instrig], [updtrig], [seltrig], [category], [cache] FROM [TWPPROD].[dbo].[sysobjects] where [type]='K'