지워봐요
// 받을 인자가 아이디 밖에 없어서 간편하다... 좋다...
public class DeleteSQLMore extends IConnectImpl {
@Override
public void execute()throws Exception{
try{
connect(ORACLE_URL,"KOSMO","KOSMO"); // 이번엔 생성자 안쓰고 여기다가 연결하네
psmt = conn.prepareStatement("DELETE member WHERE username = ?");
while(true){
psmt.setString(1,getValue("삭제 할 아이디"));
System.out.println(psmt.executeUpdate()+"행이 삭제되었습니다.");
}
}
finally{
close();
}
}
public static void main(String[] args) throws Exception {
new DeleteSQLMore().execute();
}
}
'학원 > JDBC' 카테고리의 다른 글
10/24 27-9 (SelectSQL.prepared) (0) | 2022.10.24 |
---|---|
10/24 27-8 (UpdateSQL.prepared) (0) | 2022.10.24 |
10/24 27-6 (inserSQL.prepared) (0) | 2022.10.24 |
10/24 27-5 (SelectSQL.statement) (0) | 2022.10.24 |
10/24 27-4 (insertSQLAutoGeneratedKeys) (0) | 2022.10.24 |