查询phpmyadmin的问题

时间:2011-03-27 08:37:59

标签: sql phpmyadmin

我是sql / phpmyadmin的新手,我遇到了这个查询的问题。

SELECT `2.checkNumber`,`1.customerName'
FROM 
`classicmodels1` AS 1,
`classicmodels2` AS 2
WHERE `1.customerNumber`=`2.customerNumber`

1 个答案:

答案 0 :(得分:2)

替换:

`1.customerName'

`1.customerName`

甚至更好地重写它以避免使用引号。我也会分别用't1'和't2'替换别名'1'和'2':

SELECT t2.checkNumber,t1.customerName
FROM 
classicmodels1 AS t1,
classicmodels2 AS t2
WHERE t1.customerNumber=t2.customerNumber