Creating MySQL Database and Tables using SQL Queries - Part 5

Опубликовано: 20 Февраль 2026
на канале: Data Science Man
29
0

Here are the commands used in this video

-- Create a database using SQL query --

CREATE DATABASE `db_super_store`

-- Create table inside that database using query --

-- item_categories - electronics, home & furniture, books --

- 99 numeric or a string alphabets, numbers and special char-

CREATE TABLE `categories`(

category_id int(2) not null auto_increment primary key,

category_name varchar(100) not null,

category_desc varchar(500) not null

)

create table `customers`(

customer_id int(10) not null auto_increment primary key,

customer_name varchar(50) not null,

customer_phone varchar(15) not null,

customer_email varchar(50) not null

)

-- creating database and table without queries --

-- creating database and table with queries --

-- insert data without query --

-- insert data with query --

INSERT INTO `tbl_school` (`school_id`, `school_name`, `email`,

`website`, `address`, `phone`)

VALUES (NULL, 'XYZ School', '[email protected]',

'xyzexamplesxhool.com', '111, Exxmple Street, Delhi, India',

'+91-345'),

(NULL, 'UVW School', '[email protected]',

'www.uvwexamplesxhool.com', '', '+91-457');