Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 02: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, 04:30
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,143
Take a look at the syscolumns table
__________________
George
You only stop learning when you stop asking questions.
Reply With Quote
  #3 (permalink)  
Old 09-21-07, 08:23
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
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

pre-order my book Simply SQL from Amazon
Reply With Quote
  #4 (permalink)  
Old 09-21-07, 08:28
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,143
What's wrong with syscolumns?
__________________
George
You only stop learning when you stop asking questions.
Reply With Quote
  #5 (permalink)  
Old 09-21-07, 08:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
doesn't work in sql server 2005
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #6 (permalink)  
Old 09-21-07, 08:42
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,143
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
You only stop learning when you stop asking questions.
Reply With Quote
  #7 (permalink)  
Old 09-21-07, 09:09
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
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

pre-order my book Simply SQL from Amazon
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

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