본문 바로가기
728x90
반응형

Database20

[Oracle] 시퀀스 생성 system 계정으로 sqlplus 접속 1234567891011121314151617181920212223242526272829grant connect, resource to user; //미리 만들어놓은 user 계정에 권한 부여 grant create table to user; //user 계정에 테이블 만들수 있는 권한 부여 grant create sequence to user; //user 계정에 시퀀스 만들수 있는 권한 부여 create table test( num number, id varchar(20) not null, pass varchar(20) not null, name varchar(20) not null, PRIMARY KEY (id)); create sequence autonum.. 2017. 12. 19.
[MySQL] TO_CHAR() 출력 형식 지정(소수점) 1select ename, sal, RTRIM(TO_CHAR(sal/12/5, 'FM9990D9'), '.') from emp where deptno = 20;cs TO_CHAR( 컬럼 명, 'FM(숫자범위)D(소수점 이하 숫자범위)'), '.')//​(​FM은 공백 제거) 2017. 12. 19.
[MySQL] INNER JOIN 추가 조건 쓰기 receipt 테이블의 pid와 patient 테이블의 pid가 같으면서 treatok 가 N 인 환자를 찾고싶을때! ResultSet rs = stmt.executeQuery( "select R.pid, P.name, R.rctid from receipt R inner join patient P on R.pid = P.pid where R.treatok='N'"); 결과창 : 2017. 12. 19.
[MySQL] Creating connections to db 잘 되던 DB연결이 갑자기 에러가...... Could not connect to jspbook.Error creating SQL Model Connection connection to jspbook. (Error: com.mysql.jdbc.Driver) 최근 환경설정 하다가 이것저것 건드려서 그런건지.. 해결방법은 간단하다! *** 해결 방법 : Database Connections의 DB의 Driver Properties의 mysql-connector-java-5.1.8-bin.jar 경로를 다시 설정 ( jar파일 첨부되어있음) 2017. 12. 19.
728x90
반응형