Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.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
MySQL中的错误1248:";每个派生表都必须有自己的别名;_Mysql - Fatal编程技术网

MySQL中的错误1248:";每个派生表都必须有自己的别名;

MySQL中的错误1248:";每个派生表都必须有自己的别名;,mysql,Mysql,我正在尝试运行此查询: SELECT DISTINCT col1 FROM ( SELECT CONCAT(retailerId,'_recharge') FROM retailerinformation WHERE Channel='videocon' AND retailerId='kioskpb20130909045617' ) 但每次运行时,我都会出现以下错误: Error Code : 1248 Every derived table must have it

我正在尝试运行此查询:

SELECT DISTINCT col1 
FROM 
  (
   SELECT CONCAT(retailerId,'_recharge') FROM retailerinformation
   WHERE Channel='videocon' AND retailerId='kioskpb20130909045617'
  )
但每次运行时,我都会出现以下错误:

Error Code : 1248 Every derived table must have its own alias

你的错误很明显。创建别名:

SELECT DISTINCT 
  col1 
FROM 
  (select concat(retailerId,'_recharge') from retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617') AS tmp_table

提示:如果你试图理解错误,而不仅仅是阅读它们——这将是一个成功的故事。

你的错误非常清楚。创建别名:

SELECT DISTINCT 
  col1 
FROM 
  (select concat(retailerId,'_recharge') from retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617') AS tmp_table

提示:如果你试图理解错误,而不仅仅是阅读它们——这将是一个成功的故事。

你的错误非常清楚。创建别名:

SELECT DISTINCT 
  col1 
FROM 
  (select concat(retailerId,'_recharge') from retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617') AS tmp_table

提示:如果你试图理解错误,而不仅仅是阅读它们——这将是一个成功的故事。

你的错误非常清楚。创建别名:

SELECT DISTINCT 
  col1 
FROM 
  (select concat(retailerId,'_recharge') from retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617') AS tmp_table
提示:如果您试图理解错误,而不仅仅是阅读错误-这将是一个成功的故事。

尝试以下版本:

select DISTINCT col1 from 
 (select concat(retailerId,'_recharge') from retailerinformation
   where Channel='videocon' and retailerId='kioskpb20130909045617') as retailerino
注意子查询上的别名。

尝试以下版本:

select DISTINCT col1 from 
 (select concat(retailerId,'_recharge') from retailerinformation
   where Channel='videocon' and retailerId='kioskpb20130909045617') as retailerino
注意子查询上的别名。

尝试以下版本:

select DISTINCT col1 from 
 (select concat(retailerId,'_recharge') from retailerinformation
   where Channel='videocon' and retailerId='kioskpb20130909045617') as retailerino
注意子查询上的别名。

尝试以下版本:

select DISTINCT col1 from 
 (select concat(retailerId,'_recharge') from retailerinformation
   where Channel='videocon' and retailerId='kioskpb20130909045617') as retailerino
注意子查询上的别名。

这将起作用:

SELECT 
DISTINCT col1
FROM (
   SELECT concat(retailerId,'_recharge') 
   FROM retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617'
   ) AS alias
这将有助于:

SELECT 
DISTINCT col1
FROM (
   SELECT concat(retailerId,'_recharge') 
   FROM retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617'
   ) AS alias
这将有助于:

SELECT 
DISTINCT col1
FROM (
   SELECT concat(retailerId,'_recharge') 
   FROM retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617'
   ) AS alias
这将有助于:

SELECT 
DISTINCT col1
FROM (
   SELECT concat(retailerId,'_recharge') 
   FROM retailerinformation where Channel='videocon' and retailerId='kioskpb20130909045617'
   ) AS alias

除了在子查询中添加别名外,在外部查询中调用的列应该存在于子查询中。在这种情况下,col1应该存在于子查询中。话虽如此,这应该行得通

SELECT DISTINCT col1 
FROM 
  (
   SELECT CONCAT(retailerId,'_recharge') col1 FROM retailerinformation
   WHERE Channel='videocon' AND retailerId='kioskpb20130909045617'
  ) sub

除了在子查询中添加别名外,在外部查询中调用的列应该存在于子查询中。在这种情况下,col1应该存在于子查询中。话虽如此,这应该行得通

SELECT DISTINCT col1 
FROM 
  (
   SELECT CONCAT(retailerId,'_recharge') col1 FROM retailerinformation
   WHERE Channel='videocon' AND retailerId='kioskpb20130909045617'
  ) sub

除了在子查询中添加别名外,在外部查询中调用的列应该存在于子查询中。在这种情况下,col1应该存在于子查询中。话虽如此,这应该行得通

SELECT DISTINCT col1 
FROM 
  (
   SELECT CONCAT(retailerId,'_recharge') col1 FROM retailerinformation
   WHERE Channel='videocon' AND retailerId='kioskpb20130909045617'
  ) sub

除了在子查询中添加别名外,在外部查询中调用的列应该存在于子查询中。在这种情况下,col1应该存在于子查询中。话虽如此,这应该行得通

SELECT DISTINCT col1 
FROM 
  (
   SELECT CONCAT(retailerId,'_recharge') col1 FROM retailerinformation
   WHERE Channel='videocon' AND retailerId='kioskpb20130909045617'
  ) sub

让我困惑的是,您有一个用于
retailerId
的字符串表达式,但无论如何都要在表中查找它。为什么要这样做?你只需说“选择‘kioskpb20130909045617_recharge’;”就可以节省很多时间,因为你并没有从数据库中获得多少新信息(除了存在记录)。让我困惑的是,你有一个用于
retailerId
的字符串表达式,但无论如何都要在表中查找它。为什么要这样做?你只需说“选择‘kioskpb20130909045617_recharge’;”就可以节省很多时间,因为你并没有从数据库中获得多少新信息(除了存在记录)。让我困惑的是,你有一个用于
retailerId
的字符串表达式,但无论如何都要在表中查找它。为什么要这样做?你只需说“选择‘kioskpb20130909045617_recharge’;”就可以节省很多时间,因为你并没有从数据库中获得多少新信息(除了存在记录)。让我困惑的是,你有一个用于
retailerId
的字符串表达式,但无论如何都要在表中查找它。为什么要这样做?只需说“选择‘kioskpb20130909045617_recharge’”,就可以节省大量时间,因为您并没有从数据库中获得多少新信息(除了存在记录之外)。