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