常用SQL

2019-07-08  本文已影响0人  JiangCheng97
DELETE FROM table WHERE (TO_DAYS(NOW()) - TO_DAYS(CREATE_TIME)) >= 7;
select * from  testTable WHERE id > 2000 into outfile '/tmp/testTable .csv' fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
LOAD DATA INFILE '/tmp/testTable .csv' INTO TABLE testTable fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
mysqldump -uroot  -ppassword -S /var/lib/mysql/mysql.sock --default-character-set=utf8 -R  --triggers  --events --opt --set-gtid-purged=off --hex-blob --single-transaction ordercenter testTable--where 'id>10000'> /tmp/testTable.sql
上一篇 下一篇

猜你喜欢

热点阅读