0

Select * from Birey b where Id = (select OgrenciId from SınavOgrenci s where s.Notu=92 )

How to do it using join

26th Apr 2020, 9:08 AM
Paradise Paradise
Paradise Paradise - avatar
21 Respostas
0
Hi Paradise Paradise, select * from Birey b join SinavOgrenci s on s.Ogrencild = b.Id where s.Notu = 92
27th Apr 2020, 1:25 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
Hi Abdoul Hakim So what kind of table and column can be made about this code?
27th Apr 2020, 7:37 AM
Paradise Paradise
Paradise Paradise - avatar
0
Select * from Birey b where not exists (select 1 from SınavOgrenci s where s.OgrenciId = b.Id ) There is join here, I know the answer to that. But I can't do the table and column
27th Apr 2020, 7:40 AM
Paradise Paradise
Paradise Paradise - avatar
0
What do you mean ? Which table and column can't you do ?
27th Apr 2020, 7:50 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
join means to join I need to create a sql table and column with these codes. But for these I need to use join
27th Apr 2020, 7:54 AM
Paradise Paradise
Paradise Paradise - avatar
0
Now I understand. What kind of table do you need ? A temporal or a normal Table ? And What kind of Datatype must the column have ?
27th Apr 2020, 7:56 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
Select * from Birey b where not exists (select 1 from SınavOgrenci s where s.OgrenciId = b.Id ) Select * from Birey b where Id = (select OgrenciId from SınavOgrenci s where s.Notu=92 ) It will be the normal table. Columns will be made with join codes The two codes I will use
27th Apr 2020, 8:21 AM
Paradise Paradise
Paradise Paradise - avatar
0
I woud then recommend to create two temp table for you code and then join them like that: --Select and automatically creates a new table --code 1 select * into #table1 from Birey b where not exists (select 1 from SinavOgrenci s where s.Ogrencild = b.Id) --code 2 select * into #table2 from Birey b where Id = (select Ogrencild from SinavOgrenci s where s.Notu = 92) -- Now you can join both temporal tables and create you desired table select * into myTable from #table1 t1 join #table2 t2 on t2.Id = t1.Id
27th Apr 2020, 9:00 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
thank you thank you can you send me the tables by mail I don't have a computer yetšŸ˜”
27th Apr 2020, 9:04 AM
Paradise Paradise
Paradise Paradise - avatar
0
The tables I created are temporal: this means they are created on the fly and they dont have to be like that. You can just use different table names if you wan
27th Apr 2020, 9:07 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
How are permanent tables? Do you suggest different table names?
27th Apr 2020, 9:12 AM
Paradise Paradise
Paradise Paradise - avatar
0
In my example "myTable" is permanent table. You can give it a different name if you want
27th Apr 2020, 9:32 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
thank you Can you make an example of a table about temporary codes you just made for me?
27th Apr 2020, 9:35 AM
Paradise Paradise
Paradise Paradise - avatar
0
You mean how to create a temporal table ?
27th Apr 2020, 11:10 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
Forget the temporary painting. Can you create a table with two codes you just made? I don't have a computer, I can't
27th Apr 2020, 11:19 AM
Paradise Paradise
Paradise Paradise - avatar
0
Yeah but that won't make any because I don't know in which databse you're working.
27th Apr 2020, 4:37 PM
Abdoul Hakim
Abdoul Hakim - avatar
0
I am working from the sql database
27th Apr 2020, 4:47 PM
Paradise Paradise
Paradise Paradise - avatar
0
I do not know much about sql, because of the virus, I did not see the subjects interrupted
27th Apr 2020, 4:49 PM
Paradise Paradise
Paradise Paradise - avatar
0
I understand, unfortunatelly I dont't think there's a way to show databases or tables on mobile devices... But if you have any other questions related to SQL you can ask me
28th Apr 2020, 2:02 AM
Abdoul Hakim
Abdoul Hakim - avatar
0
thank you I was very grateful
28th Apr 2020, 6:54 AM
Paradise Paradise
Paradise Paradise - avatar