DataBase/oracle
-
oracle 숫자형 함수DataBase/oracle 2020. 3. 15. 14:21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 /* avg() */ select avg(salary) from employees where department_id = 50; /* max() min() */ select max(salary) from employees; select max(hire_date) from employees; -- 가장 최근에 입사한 사람 select min(salary) from employees; select min(hire_date) from employees; -..
-
SelectDataBase/oracle 2020. 3. 10. 00:29
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 /*계정의 테이블들 보여줌*/ SELECT * FROM TAB; /*중복제거*/ SELECT DISTINCT job_id FROM employees; /*DATA 연산?*/ SELECT FIRST_NAME , LAST_NAME, hire_date FROM employees WHERE hire_date >= '04/01/01'; /*NOT*/ SELECT FIRST_NAME, LAST_NAME, department_id FROM employees WHERE department_id NOT IN 50; SELECT FIRST_NAME, LAST_NAME, department_id FROM employees WHERE ..
-
Oracle scott계정 연결DataBase/oracle 2020. 3. 9. 23:24
1) oracle이 설치되어있는 경로에서 scott 검색 2) cmd에서 sqlplus system 계정으로 로그인 3) @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql 치고 엔터 (@붙이고 scott.sql 드레그하면 됨) 4) alter user 계정명 identified by 비번 명령어로 계정 비번 변경 ==> scott 계정의 비밀번호는 tiger로 변경되었다! 5) conn 명령어로 접속