随笔分类 - MySQL
摘要:创建: create [unique] index indexname on tablename(col); alter table tal_name add primary_key(cloumn_list);该语句添加一个主键,这说明索引值必须唯一,且不能为null alter table tal
阅读全文
摘要:1.distinct去重 去掉所有相同字段 2.group_concat函数 select id,group_concat(price separator ';') from goods group by id; 3.聚合函数加count 在select中使用count(distinct 字段)
阅读全文

浙公网安备 33010602011771号