0
Select * from Birey b where Id = (select OgrenciId from SınavOgrenci s where s.Notu=92 )
How to do it using join
21 Respuestas
0
Hi Paradise Paradise,
select *
from Birey b
join SinavOgrenci s on s.Ogrencild = b.Id
where s.Notu = 92
0
Hi Abdoul Hakim
So what kind of table and column can be made about this code?
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
0
What do you mean ? Which table and column can't you do ?
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
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 ?
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
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
0
thank you thank you
can you send me the tables by mail
I don't have a computer yet😔
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
0
How are permanent tables? Do you suggest different table names?
0
In my example "myTable" is permanent table. You can give it a different name if you want
0
thank you
Can you make an example of a table about temporary codes you just made for me?
0
You mean how to create a temporal table ?
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
0
Yeah but that won't make any because I don't know in which databse you're working.
0
I am working from the sql database
0
I do not know much about sql, because of the virus, I did not see the subjects interrupted
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
0
thank you I was very grateful