연결 생성
데이터베이스 연결 생성
//로그인
String url = "데이터베이스 접속주소";
String username = "데이터베이스 사용자명";
String password = "데이터베이스 사용자 비밀번호";
Connection con = DriverManager.getConnection(url, username, password);
//로그아웃
con.close();Database URL
String url = "jdbc:oracle:thin:@localhost:1521:xe";Database URL 예시
Last updated