Oracle SQL'ye Giriş
Sara Billen
Curriculum Manager

SELECT FirstName, LastName, Country
FROM Customer
WHERE Country = 'Portugal'
| FirstName | LastName | Country |
|-----------|-----------|----------|
| João | Fernandes | Portugal |
| Madalena | Sampaio | Portugal |
| Operatör | Açıklama |
|---|---|
| > | Büyüktür |
| >= | Büyük eşittir |
| < | Küçüktür |
| <= | Küçük eşittir |
| = | Eşittir |
| <> | Eşit değildir |
SELECT UnitPrice
FROM Track
WHERE UnitPrice <> 0.99

SELECT Name, Milliseconds
FROM Track
WHERE Milliseconds BETWEEN 100000 AND 200000
| Name | Milliseconds |
|-------------------|--------------|
| Perfect | 188133 |
| Right Through You | 176117 |
| We Die Young | 152084 |
| Put You Down | 196231 |
| ... |
SELECT EmployeeId, LastName, Title
FROM Employee
WHERE EmployeeId IN (4, 5, 6)
| EmployeeId | LastName | Title |
|------------|----------|---------------------|
| 4 | Park | Sales Support Agent |
| 5 | Johnson | Sales Support Agent |
| 6 | Mitchell | IT Manager |
LIKE ile bir karakter desenine uyan satırları seçin
| Sembol | Açıklama |
|---|---|
% |
Sıfır veya daha fazla karakterden oluşan dizi |
_ |
Tek bir karakter |
SELECT LastName
FROM Employee
WHERE LastName LIKE '_a%'
| LastName |
|----------|
| Park |
| Callahan |

SELECT InvoiceId, BillingCountry, Total
FROM Invoice
WHERE BillingCountry = 'Australia'
AND Total > 4
| InvoiceId | BillingCountry | Total |
|-----------|----------------|-------|
| 66 | Australia | 5.94 |
| 250 | Australia | 13.86 |
| 305 | Australia | 8.91 |
SELECT InvoiceId, BillingCountry, Total
FROM Invoice
WHERE BillingCountry = 'Australia'
OR Total > 4
| InvoiceId | BillingCountry | Total |
|-----------|----------------|-------|
| 3 | Belgium | 5.94 |
| 4 | Canada | 8.91 |
| 5 | USA | 13.86 |
| 10 | Ireland | 5.94 |
| ... |
SELECT InvoiceId, BillingCountry, Total
FROM Invoice
WHERE BillingCountry NOT IN ('Australia', 'Canada', 'United Kingdom')
| InvoiceId | BillingCountry | Total |
|-----------|----------------|-------|
| 1 | Germany | 1.98 |
| 2 | Norway | 3.96 |
| 3 | Belgium | 5.94 |
| 5 | USA | 13.86 |
| ... |
WHERE: bir koşula göre satırları filtreler
=, <, >, <=, >=, <>BETWEEN, IN, LIKEAND, OR, NOTOracle SQL'ye Giriş