Lines Matching full:create
16 # 1. CREATE and DROP TRIGGER tests
25 # trig-1.9: Ensure that we cannot create a trigger on sqlite_master
38 CREATE TRIGGER trig UPDATE ON no_such_table BEGIN
45 CREATE TEMP TRIGGER trig UPDATE ON no_such_table BEGIN
52 CREATE TABLE t1(a);
55 CREATE TRIGGER tr1 INSERT ON t1 BEGIN
61 CREATE TRIGGER tr1 DELETE ON t1 BEGIN
70 CREATE TRIGGER tr2 INSERT ON t1 BEGIN
73 CREATE TRIGGER tr2 INSERT ON t1 BEGIN
81 CREATE TRIGGER tr1 DELETE ON t1 BEGIN
110 CREATE TEMP TABLE temp_table(a);
114 CREATE TRIGGER temp_trig UPDATE ON temp_table BEGIN
123 CREATE TRIGGER tr1 AFTER UPDATE ON sqlite_master BEGIN
127 } {1 {cannot create trigger on system table}}
135 create table t1(a,b);
140 create trigger r1 after delete on t1 for each row begin
150 create table t1(a,b);
155 create trigger r1 after update on t1 for each row begin
164 # Ensure that we cannot create INSTEAD OF triggers on tables
167 create table t1(a,b);
168 create trigger t1t instead of update on t1 for each row begin
172 } {1 {cannot create INSTEAD OF trigger on table: t1}}
173 # Ensure that we cannot create BEFORE triggers on views
176 create view v1 as select * from t1;
177 create trigger v1t before update on v1 for each row begin
181 } {1 {cannot create BEFORE trigger on view: v1}}
182 # Ensure that we cannot create AFTER triggers on views
186 create view v1 as select * from t1;
187 create trigger v1t AFTER update on v1 for each row begin
191 } {1 {cannot create AFTER trigger on view: v1}}
197 CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
204 CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
211 # Create a trigger that refers to a table that might not exist.
215 CREATE TEMP TABLE t2(x,y);
218 CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
243 CREATE TEMP TABLE t2(x,y);
251 CREATE TEMP TRIGGER r1 AFTER INSERT ON t1 BEGIN
261 CREATE TABLE t2(x,y);
282 CREATE TEMP TRIGGER r1 BEFORE INSERT ON t1 BEGIN
315 # Create a trigger with the same name as a table. Make sure the
324 CREATE TRIGGER t2 BEFORE DELETE ON t2 BEGIN
363 CREATE TRIGGER 'trigger' AFTER INSERT ON t2 BEGIN SELECT 1; END;
375 CREATE TRIGGER "trigger" AFTER INSERT ON t2 BEGIN SELECT 1; END;
387 CREATE TRIGGER [trigger] AFTER INSERT ON t2 BEGIN SELECT 1; END;
402 CREATE TABLE t3(a,b);
403 CREATE TABLE t4(x UNIQUE, b);
404 CREATE TRIGGER r34 AFTER INSERT ON t3 BEGIN
430 # example, that you can drop and re-create tables referenced by triggers.
435 execsql {CREATE TABLE t3(a, b, c);} db2
443 CREATE TABLE t1(a, b, c);
444 CREATE temp TABLE t2(a, b, c);
445 CREATE TABLE insert_log(db, a, b, c);
450 CREATE TEMP TRIGGER trig1 AFTER INSERT ON t1 BEGIN
453 CREATE TEMP TRIGGER trig2 AFTER INSERT ON t2 BEGIN
456 CREATE TEMP TRIGGER trig3 AFTER INSERT ON t3 BEGIN
501 # Drop and re-create the insert_log table in a different database. Note
506 CREATE temp TABLE insert_log(db, d, e, f);