Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help in query

Author  Topic 

aashirwaads
Starting Member

8 Posts

Posted - 2007-11-26 : 02:14:37
Hi,

I had a query.....I have a word called "serial" in many of my tables in the db...I want to find only the tablenames which has a word called serial in it...Can you please help me with this?

Thanks

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-11-26 : 02:17:26
By "word", do you mean column name or column value?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-26 : 02:56:45
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

aashirwaads
Starting Member

8 Posts

Posted - 2007-11-26 : 03:05:25
there is a word called serial in the table name for eg.

the table names are like employee_serial_no,contingent_serial_no

I want the list of table names which has the word serial in it.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-11-26 : 03:23:10
[code]select table_name from information_schema.tables where table_name like '%_serial_%'[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -