[TIL] 플레이데이터 인공지능 24기 DAY 98

황예빈·2022년 12월 20일
0

플레이데이터 TIL

목록 보기
13/21
post-thumbnail

Class.forName("oracle.jdbc.OracleDriver");
String jdbcUrl = "jdbc:oracle:thin:@localhost:1521:XE";
String user = "scott";
String passwd = "tiger";
Connection conn = DriverManager.getConnection(jdbcUrl, user, passwd);
Statement stmt = conn.createStatement();

executeQuery(SQL) - SELECT
executeUpdate(SQL) - INSERT,UPDATE,DELETE,CREATE TABLE, DROP TABLE
execute(SQL) - SQL 명령의 종류를 구분하지 않는다.

  • 휴지통에 들어있는 테이블을 조회
    show recyclebin;

  • 휴지통의 모든 내용 삭제
    purge recyclebin;

  • 삭제된 테이블을 되살리고 싶다면
    flashback table 테이블명 to before drop;

  • 특정 테이블을 휴지통에 남기지 않고 모두 삭제
    drop table 테이블명 purge;

  • purge문 없이 그냥 drop 한 후에는
    purge table 테이블명;

profile
Lv. 23

0개의 댓글