基本的なSQL 日記

・SELECT
SELECT colname FROM tablename WHERE colname = val ;
 
・INSERT
INSERT INTO tablename (colname colname) VALUES ( value value );
 
・UPDATE
UPDATE tablename SET colname = value WHERE colname = value ;
 
・DELETE
DELETE FROM tablename WHERE colname = value ;
 
・TABLE 作成
CREATE TABLE tablename (colname type colname type …);