数据库覆盖数据
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();
}
}
}