【问题标题】:update my table and insert new column in mysql using nodejs使用nodejs更新我的表并在mysql中插入新列
【发布时间】:2012-06-18 11:06:45
【问题描述】:

我需要在现有表中插入新列的语法

client.query('ALTER TABLE login ADD'+'code VARCHAR(255)',function(err,result){
    if(err){
        console.log("ERROR:"+err.message);
    }
    else{
        console.log("new column added");
    }
});

它显示错误只需要提前适当的 sytanx thanx

【问题讨论】:

    标签: mysql node.js


    【解决方案1】:

    更改查询

          ALTER table login add column (code varchar(255));
    

    【讨论】:

      猜你喜欢
      • 2016-01-13
      • 2020-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-25
      相关资源
      最近更新 更多