首页 \ 问答 \ 'on子句'中的MySQL未知列:((MySQL Unknown column in 'on clause' :()

'on子句'中的MySQL未知列:((MySQL Unknown column in 'on clause' :()

我的查询看起来像

SELECT а.*, m.username, m.picture, m.picture_active
FROM questions_answer AS а 
INNER JOIN members AS m ON а.poster_id=m.member_id
INNER JOIN questions AS q ON q.question_id=a.question_id
ORDER BY a.postdate DESC

我收到错误:

Unknown column 'a.question_id' in 'on clause'

我不知道有什么问题,请帮帮我。

questions

CREATE TABLE IF NOT EXISTS `questions` (
  `question_id` int(9) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(9) unsigned NOT NULL DEFAULT '0',
  `question` text NOT NULL,
  `postdate` int(10) unsigned NOT NULL DEFAULT '0',
  `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`question_id`),
  KEY `member_id` (`member_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

questions_answer

CREATE TABLE IF NOT EXISTS `questions_answer` (
  `answer_id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
  `question_id` int(9) unsigned NOT NULL,
  `poster_id` int(9) unsigned NOT NULL,
  `body` text NOT NULL,
  `postdate` int(9) unsigned NOT NULL,
  PRIMARY KEY (`answer_id`),
  KEY `question_id` (`question_id`),
  KEY `poster_id` (`poster_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

My query looks like

SELECT а.*, m.username, m.picture, m.picture_active
FROM questions_answer AS а 
INNER JOIN members AS m ON а.poster_id=m.member_id
INNER JOIN questions AS q ON q.question_id=a.question_id
ORDER BY a.postdate DESC

I'm getting error:

Unknown column 'a.question_id' in 'on clause'

I don't know what is wrong, please help me with this.

Table questions is

CREATE TABLE IF NOT EXISTS `questions` (
  `question_id` int(9) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(9) unsigned NOT NULL DEFAULT '0',
  `question` text NOT NULL,
  `postdate` int(10) unsigned NOT NULL DEFAULT '0',
  `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`question_id`),
  KEY `member_id` (`member_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

and questions_answer is

CREATE TABLE IF NOT EXISTS `questions_answer` (
  `answer_id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
  `question_id` int(9) unsigned NOT NULL,
  `poster_id` int(9) unsigned NOT NULL,
  `body` text NOT NULL,
  `postdate` int(9) unsigned NOT NULL,
  PRIMARY KEY (`answer_id`),
  KEY `question_id` (`question_id`),
  KEY `poster_id` (`poster_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

原文:https://stackoverflow.com/questions/18814468
更新时间:2022-11-19 11:11

最满意答案

这是一个已知的错误,应该用Cassandra-6309修复


This is a known bug which should be fixed with Cassandra-6309

相关问答

更多
  • 使用fs shell命令: fs -rm -f -r /path/to/dir : load_resource_csv = LOAD '/user/cloudera/newfile' USING PigStorage(',') AS (name:chararray, skill:chararray ); fs -rm -r -f /user/hive/warehouse/stack/ STORE load_resource_csv INTO '/user/hive/warehouse/sta ...
  • 默认情况下,所有RDD都是惰性的。 在你召集一个动作之前,他们实际上不会做任何事情。 所以不要添加延迟,因为这只会延迟围绕RDD创建元数据而不会实际影响执行。 例 val table = sparkContext.cassandraTable[Type](keyspace,tableName) val tableWithWhere = table.where("x = 5") val tableTransformed = table.map( x:Type => turnXIntoY(x) ) //noth ...
  • 您需要使用UDF将UUID / TimeUUID的二进制字节转换为chararray。 不要试图像AS一样直接将其定义为chararray(bucket:chararray,id:chararray,app_id:chararray,event:chararray); 或者您可以使用https://github.com/cevaris/pig-dse/blob/master/src/main/java/com/dse/pig/udfs/AbstractCassandraStorage.java将UUID / ...
  • 需要添加以下选项才能使其投射... LOAD 'hbase://TABLE' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('CF:I','-caster HBaseBinaryConverter') AS (product_id:bytearray); 感谢这篇文章 。 Needed to add the following option to get it to cast... LOAD 'hbase://TABLE' USING org ...
  • Hadoop正在使用CqlPagingRecordReader尝试加载您的数据。 这导致查询与您输入的查询不同。 寻呼记录阅读器试图一次获得一小片Cassandra数据以避免超时。 这意味着您的查询将执行为 SELECT * FROM "data" WHERE token("occurday","seqnumber") > ? AND token("occurday","seqnumber") <= ? AND occurday='A Great Day' AND seqnumber=1 LIMIT 10 ...
  • 事实证明我的问题与我正在寻找的答案非常不同。 首先,创建UDF确实对此有用。 但有两件事是我们使用的是自定义Cql存储例程,它没有考虑BigDecimal。 其次,经过进一步探索后,由于一个单独的原因,事实证明问题出在cqlsh上。 这些领域实际上并没有失去精确度 。 但是, 我的整体问题的答案正是这里列出的: Astyanax Cassandra双精度型 It turns out my problem was very different than the answer I was looking for ...
  • 我认为你必须使用下面的命令来输入grunt shell。 pig -useHCatalog 请参阅此链接, 该链接显示为了处理配置单元,我们必须使用-use HCatalog,它从hive lib注册所有必需的jar。 第二个建议:尝试使用以下命令: STORE part3 into 'pedestrian_count' USING org.apache.hive.hcatalog.pig.HCatStorer(); 替换part3如下: part3 = FOREACH part2 GENERATE F ...
  • 原来你必须添加一个施法者。 像这样: USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('family:value', '-loadKey true -limit 5 -caster HBaseBinaryConverter') Turns out you have to add a caster. Like so: USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('family:va ...
  • 这是一个已知的错误,应该用Cassandra-6309修复 This is a known bug which should be fixed with Cassandra-6309
  • 在测试时,Hadoop只是可选的。 为了做任何规模的任何事情你也需要hadoop。 没有hadoop运行意味着你在本地模式下运行猪。 这基本上意味着所有数据都由您运行的同一个进程处理。这适用于单个节点和示例数据。 当运行任何大量数据或多台机器时,您希望以hadoop模式运行pig。 通过在cassandra节点上运行hadoop任务跟踪器,pig可以利用map reduce减少提供的优势,分配工作负载并使用数据局部性来减少网络传输。 Hadoop is only optional when you are ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)