File: sqlite3.sql

package info (click to toggle)
lua-dbi 0.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 448 kB
  • sloc: ansic: 3,946; sql: 291; makefile: 129
file content (85 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*

	SQLite3 test schema.

*/

drop table if exists select_tests;
create table select_tests
	(
		id integer primary key,

		name varchar(255) not null,
		flag boolean not null,

		maths int not null
	);

insert into select_tests
	(
		name,
		flag,
		maths
	)
	values
	(
		'Row 1',
		1,
		12345
	),
	(
		'Row 2',
		0,
		54321
	),
	(
		'Row 3',
		0,
		324671
	);



drop table if exists insert_tests;
create table insert_tests
	(
		id integer primary key,
		val varchar(255)
	);

drop table if exists update_tests;
create table update_tests
	(
		id integer primary key,
		name varchar(255) not null,
		last_update int not null,
		flag bool not null
	);

insert into update_tests
	(
		name,
		last_update,
		flag
	)
	values
	(
		'Row 1',
		'now',
		1
	),
	(
		'Row 2',
		'now',
		1
	),
	(
		'Row 3',
		'now',
		0
	),
	(
		'Row 4',
		'now',
		1
	);