who know about Databases and SQL Write the SQL to create a table named product with the following columns: .id

who know about Databases and SQL Write the SQL to create a table named product with the following columns: .id

Question:

 who know about Databases and SQL

Transcribed Image Text:

Write the SQL to create a table named product with the following columns:
.id – Integer, primary key
• name Variable-length string with maximum 40 characters.
• product_type – Fixed-length string with maximum 3 characters
origin_date – Year, month, and day
• weight – Precise decimal number with precision = 5 and scale = 1
Place your CREATE TABLE statement before the INSERT and SELECT statements. Run your solution and verify the result table
contains the three inserted rows.
1 — Write your CREATE TABLE statement here:
2
3
4 INSERT INTO product (id, name, product_type, origin_date, weight) VALUES
(100, ‘Tricorder’, ‘COM’, ‘2020-08-11’, 2.4),
5
6
(200, ‘Food replicator’, ‘FOD’, ‘2020-09-21’, 54.2),
7
(300, ‘Cloaking device’, ‘SPA’, ‘2019-02-04’, 177.9);
8
9 SELECT *
10 FROM product;

Expert Answer:

Answer rating: 100% (QA)

SQL script to create the product table with the specified columns an
View the full answer