Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql phpmyadmin的查询问题_Sql_Phpmyadmin - Fatal编程技术网

Sql phpmyadmin的查询问题

Sql phpmyadmin的查询问题,sql,phpmyadmin,Sql,Phpmyadmin,我是sql/phpmyadmin新手,对此查询有问题 SELECT `2.checkNumber`,`1.customerName' FROM `classicmodels1` AS 1, `classicmodels2` AS 2 WHERE `1.customerNumber`=`2.customerNumber` 替换: `1.customerName' 与 或者最好重写它以避免使用引号。另外,我将分别用“t1”和“t2”替换别名“1”和“2”: SELECT t2.checkNum

我是sql/phpmyadmin新手,对此查询有问题

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

`1.customerName'

或者最好重写它以避免使用引号。另外,我将分别用“t1”和“t2”替换别名“1”和“2”:

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

你应该加上什么样的问题。虽然在本例中,我相当确定这是数字表别名。尝试t1而不是1I,我仍然收到一个错误,显示1046-未选择任何数据库。谢谢你的帮助。我仍然收到一个错误,显示1046-没有选择数据库。谢谢您的帮助。@用户在运行查询之前,您需要在phpMyAdmin中选择一个数据库。左侧应该有一个列表Hi,我现在得到这个错误1146-表'classicmodels2.classicmodels1'不存在,此查询选择t2.payments.checkNumber,t1.customers.customerName从classicmodels1作为t1,classicmodels2作为t2,其中t1.customers.customerName=t2.payments。checkNumber@user,您应该阅读一些关于SQL的内容。t2.payments.checkNumber-这是无效的构造。
SELECT t2.checkNumber,t1.customerName
FROM 
classicmodels1 AS t1,
classicmodels2 AS t2
WHERE t1.customerNumber=t2.customerNumber