PHP 학습 의 SQL 문장 빠 른 입문

1787 단어 SQL 구문
Select * from tablename SQL> select * from employees; Select select list from tablename SQL> select employee_id,first_name from employees; Select distinct … from tablename SQL> select distinct manager_id from employees; ||연결 부 사용 및 가감 승제 및 괄호 사용 SQL>selectemployeeid,first_name||'.'||last_name,salary*(1+0.1)/100,manager_id 2 from employees; +-플러스 와 마이너스 번 호 를 만 들 려 면 SQL>select-salary from employees;<,>,<,=!=등 비교 연산 자 SQL>select*from employees where salary>13000;SQL> select * from employees where salary <13000; SQL> select * from employees where salary <>13000; SQL> select * from employees where salary =13000; In SQL> select -salary from employees where employee_id in (100,101,102); SQL> select -salary from employees where employee_id in (select employee_id from employees); not in SQL> select -salary from employees where employee_id not in (100,101,102); Any(어느 것 보다)select*from employees where employeeid >any(100,101,102); some 는 SQL-92 표준 any 의 등가 물 select*from employees where employeeid >any(100,101,102); all(모든 것 보다)select*from employees where employeeid >all(100,101,102); between and select * from employees where employee_id between 100 and 102; not between and select * from employees where employee_id not between 100 and 102; 논리 연산 자 And 와 or select*from employees where employeeid > 100 and employee_id < 1000; select * from employees where employee_id > 100 or employee_id < 1000; Order by Desc select * from employees where employee_id between 100 and 102 order by employee_id desc; Asc select * from employees where employee_id between 100 and 102 order by employee_id asc; dual 벙어리 시계 가 조회 할 시계 가 없 을 때 select sysdate from dual 을 사용 할 수 있 습 니 다.select 1*2*3*4*5 from dual;

좋은 웹페이지 즐겨찾기