If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > same field name with different tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-21-07, 01:06
gowridoc gowridoc is offline
Registered User
 
Join Date: Sep 2007
Posts: 6
Question same field name with different tables

m using EmpName filed in lot of tables in sql server data base.

how to write a query to find how many tables contains EmpName


thanks in advance

gowri
Reply With Quote
  #2 (permalink)  
Old 09-21-07, 03:30
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Take a look at the syscolumns table
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 09-21-07, 07:23
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
gowri, please stop re-posting the same question!! especially in the wrong forums!!

see same filed with different table in sql server

and george, syscolumns is ~so~ last century
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 09-21-07, 07:28
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
What's wrong with syscolumns?
__________________
George
Twitter | Blog
Reply With Quote
  #5 (permalink)  
Old 09-21-07, 07:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
doesn't work in sql server 2005
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #6 (permalink)  
Old 09-21-07, 07:42
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
It works on the 2005 box I play on...

Anyhow, how come we're letting this thread stay? It's been posting at least 3 times already, and it's in the wrong place!
__________________
George
Twitter | Blog
Reply With Quote
  #7 (permalink)  
Old 09-21-07, 08:09
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
ah, well, then i guess i was misinformed

still, it's always better to use the features that were intended for that purpose, especially if they are standard sql, n'est-ce pas?
Quote:
Originally Posted by daManual
Information schema views are based on catalog view definitions in the SQL-92 standard. They present the catalog information in a format that is independent of any catalog table implementation and therefore are not affected by changes in the underlying catalog tables. Applications that use these views are portable between heterogeneous SQL-92 compliant database systems.
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On