Create a database and a table
SQL
Easy
2 views
Problem Description
Write SQL to create database shop_db and a Products table with id, name, price.
Output Format
DDL statement(s)
Sample Test Case
Output:
Database and table created
Constraints
Use generic types
Official Solution
CREATE DATABASE shop_db; CREATE TABLE Products (product_id INT PRIMARY KEY, name VARCHAR(100) NOT NULL, price DECIMAL(10,2) NOT NULL);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!