c# - Join Tables MySQL -


I have several tables and 2 sub-selections (UserRecord, customercards) which I would like to merge into 1 table UserRecord ======================== | Record id Username ======================== | 1 | Sara | | 1 | Tom | | 2 | Sara | | 2 | Kurt | | 3 | Free | ======================= Table: Consumer guard ====================== ====== | Record id Customer Name | ============================ | 1 | Jeff | | 2 | Alex | | 2 | Peter | ============================== This should be the result: =============== = ======================= | Record id Username Customer Name | ======================================= | 1 | Sara | - | | 1 | Tom | - | | 1 | - | Jeff | | 2 | Sara | - | | 2 | Kurt | - | | 2 | - | Alex | | 2 | - | Peter | | 3 | Free | - | =======================================

I have tried with left, right, left to right, external ... . Include Customer Rickload in Ur Inner as User Record from SELECT *; Rick on ur Id = number Record id;

What you want is not included, but a union:

  Select the record ID, Username, tap as username from UNUserCord, select the record ID, username as the tap, customer name by customer name   

. .. which adds a record to just two tables. / p>

I will just add that the orders shown in the results you expected will not be. If the order is important then you should choose from this union and add a clear order buy clause to this external selection. Something like this: Select

  SELECT * (select ID, Username, User Record, select UNION, Record ID, Username as Faucet, Customer Client with Customer Name), Record ID, Username, Customer Name    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -