資料庫覆蓋數據
SQL原資料庫被覆蓋還原,以前的數據能找回來,找回方法為:
1、打開SQL Server軟體後,我們點擊下拉菜單中的還原數據按鈕。
⑵ mysql 鏁版嵁搴撳煎叆鏄瑕嗙洊榪樻槸娣誨姞
mysql 鏁版嵁搴撳煎叆鏄瑕嗙洊榪樻槸娣誨姞
濡傛灉鏈夌浉鍚岀殑鏁版嵁瀛樺湪鐨勮瘽
灝變細鐩存帴瑕嗙洊
⑶ java浠庢暟鎹搴撲竴琛ㄤ腑鍒犻櫎鏁版嵁錛屽苟鐢ㄥ彟涓涓琛ㄦ暟鎹瑕嗙洊鐨勪唬鐮
浣犲ソ錛屾垜鐢ㄧ殑鏄痵qlserver2005鏁版嵁搴撲唬鐮佸備笅錛歩mport java.sql.*;
public class Demo {
public static void main(String agrs[]) {
Connection con = null;
PreparedStatement pstmt = null;
String sql = "delete from user where username=?";
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); //璁劇疆鏁版嵁搴撹繛鎺ョ殑椹卞姩
con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=鏁版嵁搴"); //璁劇疆鏁版嵁搴撹繛鎺ョ殑 URL錛岀敤鎴峰悕錛屽瘑鐮
pstmt = con.prepareStatement(sql);
pstmt.setString(1, "aaa"); // 璁劇疆SQL璇鍙ヤ腑username鐨勫
int count = pstmt.executeUpdate();
if (count > 0) {
System.out.println("鎿嶄綔鎴愬姛");
} else {
System.out.println("鎿嶄綔澶辮觸");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}