2013-03-21 07:17:49 +00:00
|
|
|
snippet CREATE TABLE
|
|
|
|
abbr CREATE TABLE { ... }
|
|
|
|
options head
|
|
|
|
CREATE TABLE ${1:cities} (
|
|
|
|
${0:name varchar(80), country_name text}
|
|
|
|
);
|
|
|
|
DROP TABLE $1;
|
|
|
|
|
2013-07-04 06:07:00 +00:00
|
|
|
snippet CREATE INDEX
|
|
|
|
abbr CREATE INDEX ... ON ... ( ... )
|
|
|
|
options head
|
|
|
|
CREATE INDEX ${1:_name} ON ${2:cities} (${3:name});
|
|
|
|
|
2013-03-21 07:17:49 +00:00
|
|
|
snippet INSERT
|
|
|
|
abbr INSERT INTO ... VALUES ( ... )
|
|
|
|
options head
|
|
|
|
INSERT INTO ${1:cities}
|
|
|
|
VALUES (${0:'Vancouver', 'Canada'});
|
|
|
|
|
|
|
|
snippet SELECT
|
|
|
|
abbr SELECT * from ...
|
|
|
|
options head
|
|
|
|
SELECT ${1:*} FROM ${2:cities} ${0:WHERE name = 'Vancouver'};
|
2013-07-04 06:07:00 +00:00
|
|
|
|
|
|
|
snippet TRANSACTION
|
|
|
|
alias BEGIN TRANSACTION
|
|
|
|
options head
|
|
|
|
BEGIN TRANSACTION;
|
|
|
|
${0:TARGET}
|
|
|
|
COMMIT;
|