Skip to content

Instantly share code, notes, and snippets.

@UZPENG
Last active February 28, 2018 11:09
Show Gist options
  • Save UZPENG/9e1c6c52321b742956a8dde8a371ddb6 to your computer and use it in GitHub Desktop.
Save UZPENG/9e1c6c52321b742956a8dde8a371ddb6 to your computer and use it in GitHub Desktop.
sql语句

常用sql

delete from guazi where id 
in 
(select g1.id from 
(select * from guazi) as g1 
inner join 
(select * from guazi) as g2
using(name) 
where g1.id != g2.id);

命令

更改mysql时区   set time_zone="+8:00"

刷新权限
flush privileges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment