D deepthiv Registered User. Local time Today, 09:57 Joined Oct 18, 2005 Messages 11 Oct 22, 2005 #1 hi, can anyone please tell wht's the query to check if database exists, if exists list all tables in database (in sqlserver) else raise error Thanks in advance, Deepthi
hi, can anyone please tell wht's the query to check if database exists, if exists list all tables in database (in sqlserver) else raise error Thanks in advance, Deepthi
W WayneRyan AWF VIP Local time Today, 17:57 Joined Nov 19, 2002 Messages 7,122 Oct 22, 2005 #2 Deep, For SQL Server, this gives you all databases: Select Name from master..Sysdatabases order by name Then, this will give you all tables: Select Name From SomeDatabase..SysObjects Where Type = 'U' Wayne
Deep, For SQL Server, this gives you all databases: Select Name from master..Sysdatabases order by name Then, this will give you all tables: Select Name From SomeDatabase..SysObjects Where Type = 'U' Wayne
D deepthiv Registered User. Local time Today, 09:57 Joined Oct 18, 2005 Messages 11 Oct 24, 2005 #3 Thanks a lot Ryan.. It helped me