[TIL] 22.01.21
Database Function 그룹함수 : SUM, AVG, COUNT, MAX, MIN 단일함수 : NVL, NVL2 HAVING GROUP BY SubQuery 단일행 서브쿼리 다중행 서브쿼리 : IN, NOT IN, ALL, ANY, EXISTS 주말에 할 일 서브쿼리 예제 LocationController, EmployeeController 생성 FrontController 완성하기
Database Function 그룹함수 : SUM, AVG, COUNT, MAX, MIN 단일함수 : NVL, NVL2 HAVING GROUP BY SubQuery 단일행 서브쿼리 다중행 서브쿼리 : IN, NOT IN, ALL, ANY, EXISTS 주말에 할 일 서브쿼리 예제 LocationController, EmployeeController 생성 FrontController 완성하기
Database * SELECT - WHERE 1) 비교연산자 2) 논리연산자 : and, or 3) NULL 4) BETWEEN (AND) 5) IN (OR) 6) LIKE : 특정 문자열에 일치하는 데이터 조회 - _, % 7) ORDER BY - ASC(오름차순), DESC(내림차순) JDBC * DAO //1. DB 연결 String username = ""; String password = ""; String url = ""; String driver = ""; //2. driver를 메모리에 로딩 Class.forName(driver); //3. DB 연결 Connection con = DriverManager.getConnection(url, username, password); //4. Q..
Database Data Type DML - select SELECT * FROM tab; SELECT * FROM employees; SELECT last_name, salary FROM employees; SELECT hire_date, salary, salary * 12 FROM employees; SELECT SUM(salary), AVG(salary) FROM employees; SELECT * FROM departments; SELECT DISTINCT department_id FROM employees; SELECT salary AS 급여, salary * 12 AS 연봉, first_name "Your Name" FROM employees; SELECT '이름은: ' || FIRST_NAM..