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 > display the table name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-08, 04:15
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 132
display the table name

hi,
how do I display multiple TABLE NAME in my script.
e.g.

Code:
select 
table1.date,
table1.name,
table1.address
table1.TABLE1'S NAME.

table2.date,
table2.name,
table2.address
table2.TABLE2'S NAME.

table3.date,
table3.name,
table3.address
table3.TABLE3'S NAME.

FROM
table1, table2, table3
how will i display the TABLE'S NAME and unite 3 tables?

thanks
__________________
Take Nothing But Pictures;
Leave Nothing But Footprints;
Kill Nothing But Time;
Reply With Quote
  #2 (permalink)  
Old 04-15-08, 05:10
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
select .... "mytablenamer" as tablename from .......;
but why would you want to?
Reply With Quote
  #3 (permalink)  
Old 04-15-08, 06:16
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 132
thanks!

i like to monitor what process(table) my employee is doing for the whole day.

e.g.

empname / process
name1 / key entry
name1 / coding
name 2 / scanning
name2 / qc
name3 / key entry
name3 / scanning

all process is table, they input their work in tables. and they change process everyday.

thanks
__________________
Take Nothing But Pictures;
Leave Nothing But Footprints;
Kill Nothing But Time;
Reply With Quote
  #4 (permalink)  
Old 04-15-08, 07:03
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
Quote:
Originally Posted by homer.favenir
how will i display the TABLE'S NAME and unite 3 tables?
hardcode it

also, it looks like you might want to try a UNION query instead of joins
__________________
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