SQL Server / MS Access 에서
SELECT TOP 레코드개수 |PERCENT 필
FROM Customers
```드이름1, 필드이름2, ...
FROM 테이블이름
SELECT TOP 3 *
FROM Customers;
SELECT TOP 50 PERCENT *
FROM Customers
MySQL 에서
SELECT 필드이름1, 필드이름2, ...
FROM 테이블이름
WHERE 조건
LIMIT 레코드개수;
select * from orders
where payment_method = 'kakaopay'
limit 5
SELECT * FROM Customers LIMIT 3;
Oracle 에서
SELECT 필드이름1, 필드이름2, ...
FROM 테이블이름
WHERE ROWNUM <= 레코드개수;
SELECT * FROM Customers
WHERE ROWNUM <= 3;
SELECT DISTINCT 필드이름1, 필드이름2 ... FROM 테이블이름;
select distinct(payment_method) from orders
select count(*) from orders
select count(*) from users
where created_at between "2020-07-12" and "2020-07-14"
and email like "%gmail.com";
SELECT count(distinct(name)) from users