mercredi 6 avril 2016

Update column in row - column_1 = column_2

I added one column to my table with:

ALTER TABLE dn_car_repair_options ADD option_id INTEGER

Now this table has next DDL:

CREATE TABLE table_name (id INTEGER PRIMARY KEY, 
node_id INTEGER, 
name VARCHAR,
car_id INTEGER DEFAULT (0),
option_id INTEGER);

And I want UPDATE all rows where (row1)option_id = (row1)id

Can I make this using SQLite?

Aucun commentaire:

Enregistrer un commentaire