-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsqlite_online.sql
99 lines (96 loc) · 2.71 KB
/
sqlite_online.sql
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*****************************************************************************
Create Date: 05/20/2023
Author: Qiang Hao
Description: Create a product table and insert some data for the onlinestore database.
Note: This script is for the tool named SQLite Online.
*************************************************************************************/
-- Drop the product table if it exists
DROP TABLE IF EXISTS product;
-- Create the product table
CREATE TABLE product (
product_id INT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT NOT NULL,
price DECIMAL(5, 2) NOT NULL,
manufacturer TEXT NOT NULL
);
-- Insert data into the table
INSERT INTO
product (
product_id,
name,
description,
price,
manufacturer
)
VALUES
(
1,
'Atomic Nose Hair Trimmer',
'Trim your nose hairs with the precision of an atomic clock!',
19.99,
'Mad Inventors Inc.'
),
(
2,
'Selfie Toaster',
'Get your face on your toast every morning with our selfie toaster!',
24.99,
'Goofy Gadgets Corp.'
),
(
3,
'Cat-Poop Coffee',
'The only coffee made from the finest cat poop beans!',
29.99,
'Absurd Accessories'
),
(
4,
'Inflatable Briefcase',
'Need more storage space? Inflate our briefcase to double its size!',
39.99,
'Wacky Wares Ltd.'
),
(
5,
'Unicorn Horn Polish',
'Keep your unicorn''s horn shiny and smooth with our magical polish!',
9.99,
'Silly Supplies Co.'
),
(
6,
'The Mind Probe',
'A device from Star Wars that can extract information directly from a person''s mind.',
19.99,
'Mad Inventors Inc.'
),
(
7,
'Lightsabers',
'Elegant and deadly energy swords wielded by Jedi and Sith alike.',
25,
'Mad Inventors Inc.'
),
(
8,
'The Sonic Screwdriver',
'A versatile tool capable of performing a wide variety of tasks, from unlocking doors to repairing electronics.',
15.1,
'Absurd Accessories'
),
(
9,
'The Infinite Improbability Generator',
'A device that can create impossible and absurd events, such as a spaceship suddenly turning into a giant sperm whale.',
9.99,
'Silly Supplies Co.'
),
(
10,
'The Neuralyzer',
'A flashy device that erases people''s memories of specific events or encounters.',
33.55,
'Silly Supplies Co.'
);