- 2
Sql tables
Hi, I am having a problem with 2 tables I have joined. I am trying to get the data not included in one table comparing to another. from the table A i have all the data i am joining to have all the data extracted but i know i can place a is null or some other command to get the specific field on table B to get what I am leaving out. is this corect?
9 ответов
0
Can you please post your code here?
0
Select Distinct A.branch, A.item, A.cost, B.component
From cost as A right join component as B on a.item = B.item
Where A.branch = " x " and A.cost = 07 and A.component is null;
my component table has the set of items i want to look in the cost table where the item might not be. I want to pull from that table what items on the component table does not exist. this is not exact code but resembels it
0
Make it a left join
Because this has a right join you are getting everything from table B and anything in A that matches (or null if none)
Left means give everything from A and the matching data from B (or null if no match)
0
do I have have to add anything more so i can get only the null values?
0
Where B.column is null
0
Where can I do code for sal program
0
Where can I do SQL code programming
0
Use left join?
0
SELECT name,year FROM production
WHERE name = 'marvel studios'
and year
between 2010 and 2019