mardi 15 septembre 2015

Null and Empty String/Character in SQLIte Android

when i execute: dbObj.execSql("INSERT INTO table_name (col1,col2) VALUES(1,\"\") "); col2 is saved as NULL? or EMPTY STRING? OR WHAT!!!!!?

Because on retrieval it shows col2 is NULL, even when my table_name deifinition is:

CREATE TABLE table_name( col1 INTEGER, col2 VARCHAR(255) NOT NULL DEFAULT \"\");

Aucun commentaire:

Enregistrer un commentaire