Create a database and a table

Create a database and a table

Easy SQL DDL 19 views
Explanation Complexity

Problem Statement

Write SQL to create database shop_db and a Products table with id, name, price.

Input Format

SQL DDL

Output Format

DDL statement(s)

Example

None
Database and table created

Constraints

Use generic types

Input / Output Format

Input Format
SQL DDL
Output Format
DDL statement(s)
Constraints
Use generic types

Examples

Input:
None
Output:
Database and table created

Example Solution (Public)

SQL
CREATE DATABASE shop_db; CREATE TABLE Products (product_id INT PRIMARY KEY, name VARCHAR(100) NOT NULL, price DECIMAL(10,2) NOT NULL);

Official Solution Code

CREATE DATABASE shop_db; CREATE TABLE Products (product_id INT PRIMARY KEY, name VARCHAR(100) NOT NULL, price DECIMAL(10,2) NOT NULL);
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.