select * from sample33 limit 3;
select * from sample33 limit 9;


mySQL 외의 database에서 사용방법
SQL Server
Select TOP 3 * FROM sample 33;
ORACLE
Select * from sample 33 where rownum ≤ 3;
rownum: 클라이언트에게 결과가 반환될 때 각 행에 할당되는 행 번호
where구에서 지정되므로 limit과 결과 다름
offset: 결괏값으로부터 데이터를 취득할 위치를 가르킴
select * from sample33 limit 3 offset 0;
select * from sample33 limit 3 offset 3;//offset뒤 숫자 => 실제 표시될 위치 - 1
select * from sample33 limit 3 offset 2;


연산자 종류
| + | 덧셈(가산) |
|---|---|
| - | 뺄셈(감산) |
| * | 곱셈(승산) |
| / | 나눗셈(제산) |
| %, MOD | 나머지 |
연산자 우선순위
select *, price * quantity from sample34;

select *, price * quantity as amount from sample34;
select *, price * quantity amount from sample34;

select *, price * quantity "금액" from sample34;
select *, price * quantity '금액' from sample34;

select *, price * quantity "select" from sample34;
