Skip navigation links

MySQL Forums :: Newbie :: fill blanks in one table using another


Advanced Search

fill blanks in one table using another
Posted by: Paco de Kumite ()
Date: April 19, 2012 11:54AM

Hi. This is my first post. If there is some syntax to make nice looking tables, please point me to instructions on how to do it.

Suppose I have a table like this
key | field1| field2
---------------------------
a | 1 | AA
b | 3 | CF
c | 1 | QB
d | 2 | JV
--------------------------
and one like this
fieldA
--------
a
b
a
a
c
b
--------

How can I "select" a table like the second one, but with two more columns populated with the corresponding field1 and field2 values pulled from the first table? In other words, I want to select a table like this

-----------------------------
a | 1 | AA
b | 3 | CF
a | 1 | AA
a | 1 | AA
c | 1 | QB
b | 3 | CF



Edited 1 time(s). Last edit at 04/19/2012 01:39PM by Paco de Kumite.

Options: ReplyQuote


Subject Written By Posted
fill blanks in one table using another Paco de Kumite 04/19/2012 11:54AM
Re: fill blanks in one table using another laptop alias 04/19/2012 11:57AM
Re: fill blanks in one table using another Paco de Kumite 04/19/2012 12:04PM
Re: fill blanks in one table using another laptop alias 04/19/2012 01:07PM
Re: fill blanks in one table using another Paco de Kumite 04/19/2012 01:40PM
Re: fill blanks in one table using another Paco de Kumite 04/20/2012 07:43AM
Re: fill blanks in one table using another laptop alias 04/20/2012 08:31AM
Re: fill blanks in one table using another Paco de Kumite 04/20/2012 08:34AM
Re: fill blanks in one table using another laptop alias 04/20/2012 08:45AM
Re: fill blanks in one table using another Paco de Kumite 04/20/2012 08:47AM
Re: fill blanks in one table using another laptop alias 04/20/2012 09:17AM
Re: fill blanks in one table using another Paco de Kumite 04/20/2012 09:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.