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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to fid record in all tables in database

Author  Topic 

duby
Starting Member

3 Posts

Posted - 2009-02-20 : 03:29:43
I need to find record in all tables in database.
Is it possible through one query?

Thanks

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-02-20 : 03:36:50
if u want to see the all tables & their columnnames try this
select table_name,column_name from information_schema.columns order by table_name
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-20 : 03:39:52
do you mean data in tables or just structure info?
Go to Top of Page

duby
Starting Member

3 Posts

Posted - 2009-02-20 : 03:56:21
data
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-02-20 : 05:22:23
quote:
Originally posted by duby

data



If you mean, wanting to see all records in a table, use this
Select * from <tablename>

If you mean to see all records of all tables together, that doesn't make sense to me. Why would you want to do that ?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-02-20 : 05:36:13
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

Madhivanan

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

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-02-20 : 05:39:25
quote:
Originally posted by madhivanan

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

Madhivanan

Failing to plan is Planning to fail


hai madhivanan,
he/she wants the to show the overall data in all tables in a database
not to search the all columns
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-02-20 : 05:55:20
quote:
Originally posted by bklr

quote:
Originally posted by madhivanan

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

Madhivanan

Failing to plan is Planning to fail


hai madhivanan,
he/she wants the to show the overall data in all tables in a database
not to search the all columns


I think OP wants to find out particular data in all tables in all databases. Let us wait for the reply

Madhivanan

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

- Advertisement -