如何查询相同字段不同内容 select * from table where filed != 'xxx'大致这样 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SELECT distinct 字段名 from 表名 select distinct( Field ) from table; select distinct(xxx) from table;select xxx from table group by xxx; select distinct (字段名) from (表明) select xxx from table group by xxx;group by 要好点,distinct只能查一个字段出来。要不就做子查询 mysql> create table tt (a char(3));Query OK, 0 rows affected (0.16 sec)mysql> insert into tt value ('123'),('321'),('123'),('321');Query OK, 4 rows affected (0.05 sec)Records: 4 Duplicates: 0 Warnings: 0mysql> select distinct * from tt;+------+| a |+------+| 123 || 321 |+------+2 rows in set (0.05 sec) select xxx from table group by xxx; DomDocument xml encoding ajax实现phpwind中添加好友功能 着急啊!! 得不到参数?? 输出字符问题 PHP不能发RTSP请求吗 大家帮帮我啊 这个问题怎么解决?? AJAX跨域访问难题 我给分,谁要? 如何做所见即所得的数学符号 这样的日期格式应该怎么用表达式? 为何如下代码不对? 静态页面里面怎么可以用角本的形式添加PHP页 为什么PHP中getdate等函数返回的时间比机器时间滞后8小时?
group by 要好点,distinct只能查一个字段出来。要不就做子查询
Query OK, 0 rows affected (0.16 sec)
mysql> insert into tt value ('123'),('321'),('123'),('321');
Query OK, 4 rows affected (0.05 sec)
Records: 4 Duplicates: 0 Warnings: 0mysql> select distinct * from tt;
+------+
| a |
+------+
| 123 |
| 321 |
+------+
2 rows in set (0.05 sec)