SQL in Kurdish
SQL in Kurdish
FaceBook.com/2292.dana
Page 1
SQL In Kurdish
............................................................................................................................................................ 4
............................................................................................................................................................. 5
............................................................................................................................................. 6
..................................................................................................................................... 12
Create Database .......................................................................................................................................... 15
Create table................................................................................................................................................. 17
Insert ........................................................................................................................................................... 21
Update ........................................................................................................................................................ 25
delete .......................................................................................................................................................... 27
Select ........................................................................................................................................................... 30
* ............................................................................................................................................................... 30
Where ..................................................................................................................................................... 31
and .......................................................................................................................................................... 33
or ............................................................................................................................................................. 34
like ........................................................................................................................................................... 35
Char list ................................................................................................................................................... 38
IN ............................................................................................................................................................. 39
Between .................................................................................................................................................. 40
Distinct .................................................................................................................................................... 41
Order by .................................................................................................................................................. 42
TOP .......................................................................................................................................................... 44
Avg .......................................................................................................................................................... 45
count ....................................................................................................................................................... 46
max .......................................................................................................................................................... 47
Min .......................................................................................................................................................... 48
Sum ......................................................................................................................................................... 49
Len ........................................................................................................................................................... 49
Alias ......................................................................................................................................................... 50
Drop ............................................................................................................................................................ 52
Drop table ............................................................................................................................................... 52
Drop database ......................................................................................................................................... 52
FaceBook.com/2292.dana
Page 2
SQL In Kurdish
Truncate .................................................................................................................................................. 53
Alter ............................................................................................................................................................ 54
Add .......................................................................................................................................................... 54
Drop ........................................................................................................................................................ 54
Change .................................................................................................................................................... 55
Not Null ....................................................................................................................................................... 55
Null .............................................................................................................................................................. 56
Identity ........................................................................................................................................................ 57
Primary key ................................................................................................................................................. 58
Add primary key ...................................................................................................................................... 59
Drop primary key .................................................................................................................................... 60
Foreign key .................................................................................................................................................. 61
Add foreign key ....................................................................................................................................... 62
Drop foreign key ..................................................................................................................................... 63
Join .............................................................................................................................................................. 64
Inner join ................................................................................................................................................. 65
Left join ................................................................................................................................................... 67
Right join ................................................................................................................................................. 67
Full join .................................................................................................................................................... 68
............................................................................................................................................................ 69
FaceBook.com/2292.dana
Page 3
SQL In Kurdish
Page 4
FaceBook.com/2292.dana
SQL In Kurdish
Page 5
FaceBook.com/2292.dana
SQL In Kurdish
.
.
http://www.microsoft.com/express/database/
Page 6
FaceBook.com/2292.dana
SQL In Kurdish
FaceBook.com/2292.dana
Page 7
SQL In Kurdish
FaceBook.com/2292.dana
Page 8
SQL In Kurdish
.
Page 9
FaceBook.com/2292.dana
SQL In Kurdish
FaceBook.com/2292.dana
Page 10
SQL In Kurdish
FaceBook.com/2292.dana
Page 11
SQL In Kurdish
.
databases
Page 12
FaceBook.com/2292.dana
SQL In Kurdish
tables
Page 13
FaceBook.com/2292.dana
SQL In Kurdish
Page 14
FaceBook.com/2292.dana
SQL In Kurdish
Create Database
SQL
Create database
:
Create database book
Page 15
FaceBook.com/2292.dana
SQL In Kurdish
Page 16
FaceBook.com/2292.dana
SQL In Kurdish
Create table
table .
Column
column .
Varchar
int
( )
column .
:
Create table
:
Create table info
Column
Page 17
FaceBook.com/2292.dana
SQL In Kurdish
Create table info
(
Column
;)
Column
:
Create table info
(
Firstname
;)
varchar
Create table info
(
Firstname varchar
;)
:
Create table info
(
Firstname varchar (200),
;)
:
Page 18
FaceBook.com/2292.dana
SQL In Kurdish
Create table info
(
Firstname varchar (200),
Secondname varchar(200),
;)
:
Create table info
(
Firstname varchar (200),
Secondname varchar(200),
City varchar (200),
Location varchar(300),
;)
Column :
Page 19
FaceBook.com/2292.dana
SQL In Kurdish
:
:
Page 20
FaceBook.com/2292.dana
SQL In Kurdish
Insert
insert
:
Insert into :
Insert into
person :
Insert into person
column !
Page 21
FaceBook.com/2292.dana
SQL In Kurdish
values :
;) (Insert into person values
:
;)Insert into person values(dana
:
;)Insert into person values(dana,20
column .
;)Insert into person values(dana,20,soran,dellman
:
Page 22
FaceBook.com/2292.dana
SQL In Kurdish
:
:
;) column ( Insert into person
:
)Insert into person(name,age
!
;)Insert into person (name,age) values(soran,20
:
Page 23
FaceBook.com/2292.dana
SQL In Kurdish
null
:
Location
Dellman
Dyana
Dibaga
Shahidan
Sarchnar
Mirgasor
Hariq
choman
City
Soran
Soran
Hewler
Soran
Sulimani
Soran
Soran
Choman
Age
20
19
22
21
33
28
20
22
Name
Dana
Vian
Avan
Zhila
Aso
Hassan
Drakhshan
Soran
Page 24
FaceBook.com/2292.dana
SQL In Kurdish
Update
:
:
Update person
set :
Update person set
:
= Update person set age
: 22
Update person set age = 21
22
.where
22 :
Update person set age = 21 where
Update person set age = 21 where name
Page 25
FaceBook.com/2292.dana
SQL In Kurdish
22 :
;Update person set age = 22 where name =dana
22
:
:
22
Follow me :
[email protected]
www.Facebook.com/2292.dana
www.youtube.com/computersoranu
Page 26
FaceBook.com/2292.dana
SQL In Kurdish
delete
:
:
Delete from
:
; Delete from info
:
Page 27
FaceBook.com/2292.dana
SQL In Kurdish
:
Delete from person
Where
:
Delete from person where name
:
;Delete from person where name =aso
!
.
:
Page 28
FaceBook.com/2292.dana
SQL In Kurdish
...
Page 29
FaceBook.com/2292.dana
SQL In Kurdish
Select
:
:
*
Select from
:
Select from person
*
*
:
;Select * from person
:
:
Page 30
FaceBook.com/2292.dana
SQL In Kurdish
.
Where
20
:
;Select * from person where age =20
!
:
Page 31
FaceBook.com/2292.dana
SQL In Kurdish
20
:
:
;Select * from person where name=avan
:
Page 32
FaceBook.com/2292.dana
SQL In Kurdish
*
!
;Select age from person where name=soran
:
and
20
:
Select * from person where age=20
20
20 !
;Select * from person where age = 20 and name=soran
:
Page 33
FaceBook.com/2292.dana
SQL In Kurdish
20 .
!
or
20
20:
:
20 :
:
Page 34
FaceBook.com/2292.dana
SQL In Kurdish
Select * from person where name=soran
20:
;Select * from person where name=soran or age=20
20!
like
!
:
Select * from person
Page 35
FaceBook.com/2292.dana
SQL In Kurdish
()
:
Select * from person where name
!
Select * from person where name like
() :
; Select * from person where name like s%
%
() !
:
()
% :
; Select * from person where name like %n
Page 36
FaceBook.com/2292.dana
SQL In Kurdish
:
% % !
;Select * from person where name like %o%
!
Page 37
FaceBook.com/2292.dana
SQL In Kurdish
Char list
] [
:
;Select * from person where name like *abc]%
:
()
.
.
;Select * from person where name like %*abc+
:
;Select * from person where name like %[abc]%
Page 38
FaceBook.com/2292.dana
SQL In Kurdish
IN
.
( )
;)Select * from person where name in(soran,dana,twana
:
Page 39
FaceBook.com/2292.dana
SQL In Kurdish
Between
SQL
!
( )
:
Page 40
FaceBook.com/2292.dana
SQL In Kurdish
Distinct
()
.
Select distinct
:
Select distinct city
:
;Select distinct city from person
!
Page 41
FaceBook.com/2292.dana
SQL In Kurdish
Order by
:
Select * from person order by age
Asc
;Select * from person order by age asc
.
desc
;Select * from person order by age desc
:
Page 42
FaceBook.com/2292.dana
SQL In Kurdish
!
!
!
!
Page 43
FaceBook.com/2292.dana
SQL In Kurdish
TOP
:
;Select top 2 * from person
:
:
;Select top 1 * from person
:
Page 44
FaceBook.com/2292.dana
SQL In Kurdish
Avg
Average
( )
( ) ( )
( )
:
;Select avg(age) from person
:
Page 45
FaceBook.com/2292.dana
SQL In Kurdish
count
:
:
;Select count(name) from person
:
:
[email protected]
www.facebook.com/2292.dana
Page 46
FaceBook.com/2292.dana
SQL In Kurdish
max
:
:
;Select max(age) from person
:
Page 47
FaceBook.com/2292.dana
SQL In Kurdish
Min
:
;Select min(age) from person
:
Page 48
FaceBook.com/2292.dana
SQL In Kurdish
Sum
( )
:
:
;Select sum(age) from person
:
Len
:
;Select len(city) from person
:
Page 49
FaceBook.com/2292.dana
SQL In Kurdish
Alias
:
:
Select name from person as kasakan
:
;Select name as naw from person
:
person
Infos
Id .
Page 50
FaceBook.com/2292.dana
SQL In Kurdish
person
).(p
infos
)(i
:
Select p.name ,i.id
person
)(p
:
Select p.name , i.id from person as p
infos
i
:
;Select p.name , i.id from person as p , infos as I
!
Page 51
FaceBook.com/2292.dana
SQL In Kurdish
Drop
Drop table
:
;Drop table infos
.
Drop database
:
;Drop database books
Page 52
FaceBook.com/2292.dana
SQL In Kurdish
Truncate
Page 53
FaceBook.com/2292.dana
SQL In Kurdish
Alter
Add
Alter table person
birth
Add birth
Add birth int
:
;Alter table person add birth int
.
Drop
Page 54
FaceBook.com/2292.dana
SQL In Kurdish
,
;Alter table person drop column birth
.
Change
Alter table person
;Alter table person alter column location int
.
..
:
Not Null
Page 55
FaceBook.com/2292.dana
SQL In Kurdish
.
:
Create table text
(
Id int not null,
Name varchar(200),
;)
.
Null
:
Create table test
(
Id int not null,
Name varchar(200) null,
;)
Page 56
FaceBook.com/2292.dana
SQL In Kurdish
Identity
Id
( )2 .
:
Create table test4
(
Id int identity ,
Name varchar(200),
;)
id
;)Insert into test4(name) values(dana
2
Page 57
FaceBook.com/2292.dana
SQL In Kurdish
Primary key
:
Create table test5
(
Id int not null primary key,
;)
;)Insert into test5 values(1
2
2
.
;)Insert into test5 values(2
Page 58
FaceBook.com/2292.dana
SQL In Kurdish
Add primary key
Primary key
:
Alter table person
Primary key
Alter table person
Add primary key
Primary key
Alter table person
)Add primary key (id
Page 59
FaceBook.com/2292.dana
SQL In Kurdish
Drop primary key
Primary key
Primary key
Alter table person
Primary key
Alter table person
Drop constraint
Primary key
Alter table person
Drop constraint pk_id
Pk Primary key
Page 60
FaceBook.com/2292.dana
SQL In Kurdish
Foreign key
primary
Foreign key
Foreign key
primary key
create table person
(
P_id int not null primary key,
Name varchar(200),
Age int,
;)
:
Create table order
(
O_id int not null primary key,
Money int,
;)
Foreign key
foreign key
Page 61
FaceBook.com/2292.dana
SQL In Kurdish
Create table order
(
O_id int not null primary key,
Money int ,
P_id int foreign key
;)
foreign key
.
Create table order
(
O_id int not null primary key,
Money int ,
P_id int foreign key references person (p_id),
;)
Foreign key
:
Alter table orders
Foreign key
Alter table orders
)Add foreign key(p_id
Page 62
FaceBook.com/2292.dana
SQL In Kurdish
Alter table orders
)Add foreign key(p_id
;)References person(p_id
person .
Foreign key
:
Alter table order
_Drop constraint fk
!!!
Page 63
FaceBook.com/2292.dana
SQL In Kurdish
Join
!
!
;Create database test
Create table persons
(
P_id int not null primary key,
Name varchar(200),
Age int,
;)
p_id
Page 64
FaceBook.com/2292.dana
SQL In Kurdish
Create table orders
(
O_id int not null primary key,
Sell varchar(200),
P_id int not null foreign key references persons(p_id),
;)
;)Insert into persons values(2,dana,21
;)Insert into persons values(2,ali,33
;)Insert into persons values(3,soran,22
()
p_id 2
:
;)Insert into orders values(2,laptop,1
Inner join
()
:
Select * from persons
:
Select * from persons
Inner join order
Page 65
FaceBook.com/2292.dana
SQL In Kurdish
p_id
Select * from persons
Inner join orders
On
Persons.p_id=orders.p_id
!
"
Page 66
"
FaceBook.com/2292.dana
SQL In Kurdish
Left join
:
select * from persons
left join orders
on
persons.p_id=orders.p_id
;
Right join
:
Select * from persons
Right join orders
On
Persons.p_id= orders.p_id
Page 67
FaceBook.com/2292.dana
SQL In Kurdish
Full join
:
Select * from persons
full join orders
On
Persons.p_id= orders.p_id
!!!
Page 68
FaceBook.com/2292.dana
SQL In Kurdish
:
-
:
www.malikurd.com
www.facebook.com/2292.dana
Page 69
FaceBook.com/2292.dana
SQL In Kurdish
FaceBook.com/2292.dana
Page 70