2013-04-13 13:45:21 -04:00
|
|
|
snippet tbl
|
|
|
|
create table ${1:table} (
|
2013-11-16 14:45:48 -05:00
|
|
|
${0:columns}
|
2013-04-13 13:45:21 -04:00
|
|
|
);
|
|
|
|
snippet col
|
2013-11-16 14:45:48 -05:00
|
|
|
${1:name} ${2:type} ${3:default ''} ${0:not null}
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet ccol
|
2013-11-16 14:45:48 -05:00
|
|
|
${1:name} varchar2(${2:size}) ${3:default ''} ${0:not null}
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet ncol
|
2013-11-16 14:45:48 -05:00
|
|
|
${1:name} number ${3:default 0} ${0:not null}
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet dcol
|
2013-11-16 14:45:48 -05:00
|
|
|
${1:name} date ${3:default sysdate} ${0:not null}
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet ind
|
2013-11-16 14:45:48 -05:00
|
|
|
create index ${0:$1_$2} on ${1:table}(${2:column});
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet uind
|
2013-11-16 14:45:48 -05:00
|
|
|
create unique index ${1:name} on ${2:table}(${0:column});
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet tblcom
|
2013-11-16 14:45:48 -05:00
|
|
|
comment on table ${1:table} is '${0:comment}';
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet colcom
|
2013-11-16 14:45:48 -05:00
|
|
|
comment on column ${1:table}.${2:column} is '${0:comment}';
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet addcol
|
2013-11-16 14:45:48 -05:00
|
|
|
alter table ${1:table} add (${2:column} ${0:type});
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet seq
|
2013-11-16 14:45:48 -05:00
|
|
|
create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${0:1};
|
2013-04-13 13:45:21 -04:00
|
|
|
snippet s*
|
2013-11-16 14:45:48 -05:00
|
|
|
select * from ${0:table}
|