summaryrefslogtreecommitdiffstats
path: root/examples/demo/sql/book.sql
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-11-08 12:31:36 -0600
committerTimothy Pearson <[email protected]>2011-11-08 12:31:36 -0600
commitd796c9dd933ab96ec83b9a634feedd5d32e1ba3f (patch)
tree6e3dcca4f77e20ec8966c666aac7c35bd4704053 /examples/demo/sql/book.sql
downloadtqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.tar.gz
tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.zip
Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731
Diffstat (limited to 'examples/demo/sql/book.sql')
-rw-r--r--examples/demo/sql/book.sql42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/demo/sql/book.sql b/examples/demo/sql/book.sql
new file mode 100644
index 000000000..417ef4347
--- /dev/null
+++ b/examples/demo/sql/book.sql
@@ -0,0 +1,42 @@
+-- The following SQL generates the database
+-- used by the 'book' example programs
+-- Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+--
+-- This file is part of an example program for Qt. This example
+-- program may be used, distributed and modified without limitation.
+
+DROP TABLE author;
+DROP TABLE book;
+DROP TABLE sequence;
+
+CREATE TABLE author
+( id integer primary key,
+forename varchar(40),
+surname varchar(40) );
+
+CREATE TABLE book
+( id integer primary key,
+title varchar(40),
+price numeric(10,2),
+authorid integer,
+notes varchar(255) );
+
+create index book_authorid_idx on book( authorid );
+
+CREATE TABLE sequence
+( tablename varchar(10),
+sequence numeric);
+
+INSERT INTO author VALUES ( 0, 'Philip K', 'Dick' );
+INSERT INTO author VALUES ( 1, 'Robert', 'Heinlein' );
+INSERT INTO author VALUES ( 2, 'Sarah', 'Paretsky' );
+
+INSERT INTO book VALUES ( 0, 'The Man Who Japed', 6.99, 0, 'A good book' );
+INSERT INTO book VALUES ( 1, 'The Man in the High Castle', 9.99, 0, 'Worth reading' );
+INSERT INTO book VALUES ( 2, 'The Number of the Beast', 8.99, 1, 'Get this!' );
+INSERT INTO book VALUES ( 3, 'Indemnity Only', 9.99, 2, 'Cool' );
+INSERT INTO book VALUES ( 4, 'Burn Marks', 9.99, 2, 'Need to make notes' );
+INSERT INTO book VALUES ( 5, 'Deadlock', 9.99, 2, 'Hmmm..' );
+
+INSERT INTO sequence VALUES ( 'author', 2 );
+INSERT INTO sequence VALUES ( 'book', 5 );