【データベース接続、操作】
- $ psql -U user1 -h localhost -p 5432 -d testdb
- $ createdb testdb --encoding=UTF-8 --lc-collate=C --lc-ctype=C --owner=user1 --template=template0
- $ dropdb testdb
【基本SQL】
- SELECT * FROM t1 WHERE name = 'aaa1';
- UPDATE t1 SET key = 'value' WHERE id = 1
- INSERT INTO t1 VALUES (1, 'aaa', 'aaa@example.com')
- DELETE FROM t1 WHERE id = 1