SELECT CONCAT( 'drop table we7.', table_name, ';' ) FROM information_schema.tables WHERE table_schema = 'we7' AND table_name LIKE 'hjmall%';
mysqldump -h<ip> -u<username> -p<pass> <database> > name.sql
-- 导入sql source name.sql
CREATE DATABASE xcx DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
use information_schema
select * from columns where table_name='表名';
show databases;
use 数据库名;
show tables;
创建数据库
create database abc;
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s')
SELECT
a.tid AS _id,
a.tid,
a.fid,
a.author,
a.authorid,
a.subject,
b.content,
a.postdate,
a.ifcheck,
a.hits,
a.replies
FROM
(SELECT
*
FROM
pw_threads
WHERE pw_threads.tid > 0
ORDER BY pw_threads.tid
LIMIT 100) AS a
LEFT JOIN pw_tmsgs b
ON a.`tid` = b.`tid`
ORDER BY a.tid DESC
mysqlfrm --diagnostic F:/admin/
mysqldump -t database -u username -ppassword --tables table_name1 table_name2 table_name3 >D:\db_script.sql
原文:https://www.cnblogs.com/zhsngq/p/11696418.html