I'm working with Android - SQLite. I have code postal number stored as CHAR[5] in SQLite db.
Cursor cursor = db.query( ... )
String code = cursor.getString(cursor.getColumnIndex("code"));
CREATE TABLE codepostal (
code CHAR( 5 ) PRIMARY KEY NOT NULL UNIQUE,
name VARCHAR( 70 ) NOT NULL
);
INSERT INTO [codepostal] ([code], [name]) VALUES (01001, 'My_city');
However it always returns with deleting "0" begining character of code postal? (ex: code postal = "01234" but return "1234" instead)
Can someone explain?