-
SQL Program/Function Detecting Tables by Name
Hello All,
I am looking for some SQL function which would list all the tables in a DB starting with some specific names e.g
Database Name: DB_Employee
Table1 : tbl_for_employer
Table2: tbl_for_salaries_JUN_05
Table3: tbl_for_current_orders
Table4: tbl_for_salaries_JUL_05
Table5: tbl_for_salaries_AUG_05
From above DB i want some program to show me all the list of tables starting with 'tbl_for_salaries'.
All suggestions invited!
thanks,
Umer
-
select name
from sysobjects
where name like 'tbl_for_salaries%'
-
That assumes you use ms sql server.
-
Yes it is for MS SQL Server.
Thanx skhanal, thats exactly what i was looking for.
Cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|