dimanche 8 novembre 2015

SQLite syntax REPLACE + WHERE

Can someone please check this and tell me what i am doing wrong? Also i am very intrested in any other suggestion for this code. ;)

    CREATE TABLE IF NOT EXISTS chunks(x Integer(20) NOT NULL, y Integer(20) NOT NULL, 
            height Integer(20) NOT NULL, version Timestamp default (strftime('%s', CURRENT_TIME)), 
            datas Text NOT NULL);
    REPLACE INTO chunks VALUES(0,0,0,NULL,'Bla') WHERE x IS 0 AND y IS 0 AND height IS 0;

Aucun commentaire:

Enregistrer un commentaire