• <small id='ec3qd'></small><noframes id='ec3qd'>

      <bdo id='ec3qd'></bdo><ul id='ec3qd'></ul>

  • <i id='ec3qd'><tr id='ec3qd'><dt id='ec3qd'><q id='ec3qd'><span id='ec3qd'><b id='ec3qd'><form id='ec3qd'><ins id='ec3qd'></ins><ul id='ec3qd'></ul><sub id='ec3qd'></sub></form><legend id='ec3qd'></legend><bdo id='ec3qd'><pre id='ec3qd'><center id='ec3qd'></center></pre></bdo></b><th id='ec3qd'></th></span></q></dt></tr></i><div id='ec3qd'><tfoot id='ec3qd'></tfoot><dl id='ec3qd'><fieldset id='ec3qd'></fieldset></dl></div>
    <legend id='ec3qd'><style id='ec3qd'><dir id='ec3qd'><q id='ec3qd'></q></dir></style></legend>
    <tfoot id='ec3qd'></tfoot>

      1. MySQL 错误 1241:操作数应包含 1 列

        MySQL error 1241: Operand should contain 1 column(s)(MySQL 错误 1241:操作数应包含 1 列)
          <bdo id='hVhkC'></bdo><ul id='hVhkC'></ul>
            <tbody id='hVhkC'></tbody>

          <legend id='hVhkC'><style id='hVhkC'><dir id='hVhkC'><q id='hVhkC'></q></dir></style></legend>

            <tfoot id='hVhkC'></tfoot>

                  <i id='hVhkC'><tr id='hVhkC'><dt id='hVhkC'><q id='hVhkC'><span id='hVhkC'><b id='hVhkC'><form id='hVhkC'><ins id='hVhkC'></ins><ul id='hVhkC'></ul><sub id='hVhkC'></sub></form><legend id='hVhkC'></legend><bdo id='hVhkC'><pre id='hVhkC'><center id='hVhkC'></center></pre></bdo></b><th id='hVhkC'></th></span></q></dt></tr></i><div id='hVhkC'><tfoot id='hVhkC'></tfoot><dl id='hVhkC'><fieldset id='hVhkC'></fieldset></dl></div>
                1. <small id='hVhkC'></small><noframes id='hVhkC'>

                2. 本文介绍了MySQL 错误 1241:操作数应包含 1 列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试将 table1 中的数据插入 table2

                  I am trying to Insert data from a table1 into table2

                  insert into table2(Name,Subject,student_id,result)
                  select (Name,Subject,student_id,result)
                  from table1;
                  

                  table2 的键是 student_id.

                  Key for table2 is student_id.

                  假设没有任何重复项.

                  我收到错误:MySQL error 1241: Operand should contain 1 column(s)

                  table2 中只有四列.

                  There are only four columns in table2.

                  推荐答案

                  语法错误,从select中删除( ).

                  insert into table2 (name, subject, student_id, result)
                  select name, subject, student_id, result
                  from table1;
                  

                  这篇关于MySQL 错误 1241:操作数应包含 1 列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bogus foreign key constraint fail(虚假外键约束失败)
                  how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                  Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                  How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                  Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                  ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)
                3. <tfoot id='BRkFH'></tfoot>
                      <bdo id='BRkFH'></bdo><ul id='BRkFH'></ul>
                          <tbody id='BRkFH'></tbody>
                        <i id='BRkFH'><tr id='BRkFH'><dt id='BRkFH'><q id='BRkFH'><span id='BRkFH'><b id='BRkFH'><form id='BRkFH'><ins id='BRkFH'></ins><ul id='BRkFH'></ul><sub id='BRkFH'></sub></form><legend id='BRkFH'></legend><bdo id='BRkFH'><pre id='BRkFH'><center id='BRkFH'></center></pre></bdo></b><th id='BRkFH'></th></span></q></dt></tr></i><div id='BRkFH'><tfoot id='BRkFH'></tfoot><dl id='BRkFH'><fieldset id='BRkFH'></fieldset></dl></div>

                        <small id='BRkFH'></small><noframes id='BRkFH'>

                        <legend id='BRkFH'><style id='BRkFH'><dir id='BRkFH'><q id='BRkFH'></q></dir></style></legend>