sql cheat sheet
기본 문법도 못 외워서 맨날 검색하는 나를 위해
select
1
SELECT DEPTNAME, MGRNO FROM CORPDATA.DEPARTMENT WHERE DEPTNO = 'C01'
insert
1
2
3
INSERT INTO table-name (column1, column2, ... ) VALUES (value-for-column1, value-for-column2, ... )
INSERT INTO CORPDATA.EMPTIME (EMPNUMBER, PROJNUMBER, STARTDATE, ENDDATE) SELECT EMPNO, PROJNO, EMSTDATE, EMENDATE FROM CORPDATA.EMPPROJACT
update
1
UPDATE table-name SET column-1 = value-1, column-2 = value-2, ... WHERE search-condition ...
delete
1
DELETE FROM CORPDATA.EMPLOYEE WHERE WORKDEPT = 'D11'
Posted 2023-09-18