c# - Join Tables MySQL -
I have several tables and 2 sub-selections (UserRecord, customercards) which I would like to merge into 1 table I have tried with left, right, left to right, external ... . What you want is not included, but a union: . .. 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 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 | - | =======================================
Include Customer Rickload in Ur Inner as User Record from SELECT *; Rick on ur Id = number Record id;
Select the record ID, Username, tap as username from UNUserCord, select the record ID, username as the tap, customer name by customer name
SELECT * (select ID, Username, User Record, select UNION, Record ID, Username as Faucet, Customer Client with Customer Name), Record ID, Username, Customer Name
Comments
Post a Comment