var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost", user: "root", password: "12345", database: "srcmini"
});
con.connect(function(err) {
if (err) throw err;
var sql = "DROP TABLE employee2";
con.query(sql, function (err, result) {
if (err) throw err;
console.log("Table deleted");
});
});
现在打开命令终端并运行以下命令:
Node drop.js
验证表employee2是否不再存在于数据库中。
来源:
https://www.srcmini02.com/27914.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_38367.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57