Cohorts
  • Discover
  • About Us
  • Blog
  • Patika.dev
  • Web3

SQL

Giriş
Veri ve Veritabanı
Veritabanı Yönetim Sistemi
SQL Nedir?
PostgreSQL Kurulumu

SELECT
WHERE ve Karşılaştırma Operatörleri
WHERE ve Mantıksal Operatörler
Ödev 1
BETWEEN ve IN
Ödev 2
LIKE ve ILIKE
Ödev 3
DISTINCT ve COUNT
Ödev 4
PSQL ve Uygulama I

ORDER BY
LIMIT ve OFFSET
Ödev 5
Aggregate Fonksiyonlar
Ödev 6
GROUP BY
HAVING
Ödev 7
ALIAS

Tablo Oluşturmak - Silmek
Verileri Güncellemek - Silmek
Ödev 8
PRIMARY KEY - FOREIGN KEY
Veri Tipleri I
Veri Tipleri II
NOT NULL ve ALTER
UNIQUE
CHECK
PSQL ve Uygulama II

INNER JOIN
Ödev 9
LEFT JOIN
RIGHT JOIN
FULL JOIN
Ödev 10
UNION
INTERSECT ve EXCEPT
Ödev 11

Alt Sorgu Nedir?
Any ve All Operatörleri
Ödev 12
Alt sorgular ve JOIN Yapısı
Genel Tekrar

BETWEEN ve IN

BETWEEN

Aşağıdaki sorgumuzda AND mantıksal operatörü yardımıyla film tablosunda bulunan verilerimizi uzunluğu 140 tan küçük eşit VE 100 den büyük eşit olmak üzere sıralıyoruz.

SELECT * 
FROM film
WHERE length >= 100 AND length <= 140;

Burada temel olarak yaptığımız belirli aralıkta bulunan verileri sıralamak. Bunun BETWEEN ... AND yapısını kullanarak da yapabiliriz.

BETWEEN AND Söz Dizimi

SELECT <sütun_adı>, <sütun_adı>, ...
FROM <tablo_adı>
WHERE <koşul>;

BETWEEN Örnek Kullanım

SELECT *
FROM film
WHERE length BETWEEN 100 AND 140; -- WHERE length >= 100 AND length <= 140 ifadesi ile aynı sonucu verir.

Burada dikkat edilmesi gereken nokta 100 ve 140 sınır değerleri aralığa dahildir.

IN

Şöyle bir senaryo düşünelim, yine film tablosundan uzunluğu 30, 60, 90 veya 120 dakikaya eşit olan verileri sıralayalım.

SELECT * 
FROM film
WHERE length = 30 OR length = 60 OR length = 90 OR length = 120;

sorgusuyla verileri aldık ancak burada şöyle bir sorunumuz var peki 4 farklı değer için değil 14 farklı değer için bu sorgumuzu gerçekleştirmek için 14 ayrı OR mantıksal operatörü kullanmamız gerekirdi. Bunun yerine istenilen değerleri liste haline geitip IN anahtar kelimesiyle kullanabiliriz.

IN Söz Dizimi

SELECT <sütun_adı>, <sütun_adı>, ...
FROM <tablo_adı>
WHERE <sütun_adı> IN (değer1, değer2, ...);

IN Örnek Kullanım

SELECT *
FROM film
WHERE length IN (30,60,90,120);

Daha Fazlası İçin

  • W3Schools IN Operatörü
  • PostgreSQL Tutorial IN Operatörü
Previous
Next

Lesson discussion

Swap insights and ask questions about “SQL”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
Cohorts
WebsiteDiscoverBlogPatika.devRise In
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://cohorts.patika.dev is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://cohorts.patika.dev disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Cohorts, All rights reserved