How can I join two SQL tables, putting a value from the 2nd table into a column in the 1st? -


i've no idea start this! have 2 tables, 1 shows company mobile phone bill in detail, this:

enter image description here

and table shows line rental, this:

enter image description here

i want "merge" 2 tables, line rental value shown in call cost column, value "line rental" shown in call class column, , bill date shown in date column:

enter image description here

try this

select user,callcost,callclass,date 1sttable union select user,linerental,'line rental',billdate 2ndtable 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -