fahad
fahad

Reputation: 41

update my table and insert new column in mysql using nodejs

I need the syantax for inserting new column in existing table

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");
    }
});

it showing me error just need proper sytanx thanx in advance

Upvotes: 0

Views: 5409

Answers (1)

chaitu
chaitu

Reputation: 599

change the query

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

Upvotes: 1

Related Questions