1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-24 02:43:09 +01:00
php-dibi/tests/dibi/data/odbc.sql

33 lines
1.2 KiB
MySQL
Raw Normal View History

2015-01-12 05:33:41 +01:00
CREATE TABLE products (
2015-11-04 14:23:14 +01:00
product_id COUNTER,
title TEXT(50)
2015-01-12 05:33:41 +01:00
);
2015-11-04 14:23:14 +01:00
INSERT INTO products (product_id, title) VALUES (1, 'Chair');
INSERT INTO products (product_id, title) VALUES (2, 'Table');
INSERT INTO products (product_id, title) VALUES (3, 'Computer');
2015-01-12 05:33:41 +01:00
CREATE TABLE [customers] (
2015-11-04 14:23:14 +01:00
[customer_id] COUNTER,
[name] TEXT(50)
2015-01-12 05:33:41 +01:00
);
INSERT INTO `customers` (`customer_id`, `name`) VALUES (1, 'Dave Lister');
INSERT INTO `customers` (`customer_id`, `name`) VALUES (2, 'Arnold Rimmer');
INSERT INTO `customers` (`customer_id`, `name`) VALUES (3, 'The Cat');
INSERT INTO `customers` (`customer_id`, `name`) VALUES (4, 'Holly');
INSERT INTO `customers` (`customer_id`, `name`) VALUES (5, 'Kryten');
INSERT INTO `customers` (`customer_id`, `name`) VALUES (6, 'Kristine Kochanski');
CREATE TABLE [orders] (
2015-11-04 14:23:14 +01:00
[order_id] COUNTER,
[customer_id] INTEGER,
[product_id] INTEGER,
[amount] FLOAT
2015-01-12 05:33:41 +01:00
);
INSERT INTO `orders` (`order_id`, `customer_id`, `product_id`, `amount`) VALUES (1, 2, 1, 7);
INSERT INTO `orders` (`order_id`, `customer_id`, `product_id`, `amount`) VALUES (2, 2, 3, 2);
INSERT INTO `orders` (`order_id`, `customer_id`, `product_id`, `amount`) VALUES (3, 1, 2, 3);
INSERT INTO `orders` (`order_id`, `customer_id`, `product_id`, `amount`) VALUES (4, 6, 3, 5);