你好笨哦~~ 这样不就行了? SELECT DISTINCT 公司名称 FROM companys ---------- 地址呢?
sql="select distinct company_name,* from companys"
错误SQL 查询 : SELECT DISTINCT company_name, * FROM companys LIMIT 0 , 30 MySQL 返回: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM companys LIMIT 0, 30' at line 1
select company_name,company_address from companys group by company_name
这样不就行了?
SELECT DISTINCT 公司名称 FROM companys
你好笨哦~~
这样不就行了?
SELECT DISTINCT 公司名称 FROM companys
----------
地址呢?
FROM companys
LIMIT 0 , 30 MySQL 返回:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '*
FROM companys LIMIT 0, 30' at line 1
你要求的sql语句是不存在的,根本就是矛盾的下面的情况,你让数据库怎么判断?
1公司 1地址
2公司 2地址
2公司 1地址
1公司 2地址