1 示例:
#!/bin/sh DB_HOST= DB_PORT= DB_USER= DB_PASSWORD= DB_DATABASE= # IN 或者 NOT IN 是筛选条件 mysql -h${DB_HOST} -P${DB_PORT} -u${DB_USER} -p${DB_PASSWORD} ${DB_DATABASE} -e "delete from users where id not in (1,42,40878,40879,40880);"
2021-10-28 09:40:52
1 示例:
#!/bin/sh DB_HOST= DB_PORT= DB_USER= DB_PASSWORD= DB_DATABASE= # IN 或者 NOT IN 是筛选条件 mysql -h${DB_HOST} -P${DB_PORT} -u${DB_USER} -p${DB_PASSWORD} ${DB_DATABASE} -e "delete from users where id not in (1,42,40878,40879,40880);"