Skip to content

Commit 72c9697

Browse files
authored
Create ders02.sql
1 parent 74e03b4 commit 72c9697

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

ders02.sql

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
use DB_TaskopruMYO;
2+
3+
select * from tbl_ogrenci;
4+
5+
select ogrno, ad, Soyad
6+
from tbl_ogrenci
7+
where ad = 'Ali';
8+
9+
select *
10+
from tbl_ogrenci
11+
where ad = 'Ali' and ortalama='3.30';
12+
13+
select *
14+
from tbl_ogrenci
15+
where ad = 'Ali' or ortalama='1.4';
16+
17+
select ogrno, ad, ortalama
18+
from tbl_ogrenci
19+
where ortalama between 2.8 and 3.30
20+
and ad = 'Ali'
21+
22+
select *
23+
from tbl_ogrenci
24+
where dogumtarihi between '1995-01-01' and '1998-12-01'
25+
26+
select *
27+
from tbl_ogrenci
28+
where ogrno in ('102')
29+
30+
select ad, soyad
31+
from tbl_ogrenci
32+
where ad like 'A%' and soyad like '%e%'
33+
34+
select ad, soyad
35+
from tbl_ogrenci
36+
where ad not like 'A%' or soyad not like '%e%'
37+
38+
select ad, soyad
39+
from tbl_ogrenci
40+
where ad not in ('Birsen')
41+
42+
create table tbl_bolum(
43+
bolumid int not null,
44+
bolumAdi varchar(100) not null,
45+
primary key(bolumid)
46+
)
47+
48+
insert into tbl_bolum (bolumid, bolumadi)
49+
values (1, 'Bilgisayar'),
50+
(2, 'Elektrik'),
51+
(3, 'Bankacilik'),
52+
(4, 'Haritacilik')
53+
54+
select * from tbl_bolum;
55+
select * from tbl_ogrenci;
56+
57+
-- tablo iliskilendirme : tabloismi.alanismi = tabloismi.alanismi
58+
select ogrno, ad, soyad, ortalama, bolumadi
59+
from tbl_ogrenci, tbl_bolum
60+
where tbl_bolum.bolumid = tbl_ogrenci.bid
61+
And ad like 'A%'
62+
And ortalama between 2.00 and 3.00

0 commit comments

Comments
 (0)