SQL基本構文

Last Update:2012/01/04

TABLE作成

CREATE TABLE hoge(id INTEGER PRIMARY KEY AUTOINCREMENT,
foo TEXT NOT NULL,
bar INTGER);

SELECT

SELECT * FROM hoge WHERE (id=1);

INSERT

INSERT INTO hoge(foo,bar) VALUES(1,"abc");

UPDATE

UPDATE hoge SET foo='agepoyo',bar=1 where id=1;

DELETE

DELETE from hoge where id=1;