mysql如何去重复查询

mysql如何去重复查询

查询出不重复数据有多少条

SELECT distinct phone  time FROM 数据.new_table;
select phone,time from 数据.new_table group by phone;

Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

解决方法:将CSV文件放到mysql的安全目录uploads文件夹下

Mysql的load语句要比table data import 执行效率要快的多!

load data infile 'E:/xxx/data.csv' into table 数据.new_table fields terminated by ',' optionally enclosed by '"' escaped by '"'lines terminated by '\r\n'
来都来了,留个言吧🙂