Skip to content

Commit 08f4a88

Browse files
authored
Add SQL script for database and table creation
1 parent 99e52f9 commit 08f4a88

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

‎Example-File/10_11_142026.sql‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
-- introduction of Database
2+
-- intro - Sql
3+
-- Create Database
4+
-- drop Database
5+
-- select Database
6+
-- create table
7+
-- insert query
8+
-- where
9+
-- and operator
10+
-- or operator
11+
-- update query
12+
-- delete
13+
-- like
14+
-- top
15+
-- order by
16+
-- group by
17+
-- distinct keyword
18+
-- Constraints
19+
-- join
20+
-- unions claus
21+
-- truncate table
22+
-- having
23+
-- view
24+
-- useful function
25+
26+
27+
28+
-- Date 12 March 2026
29+
30+
-- show list of database
31+
show databases;
32+
33+
-- create database
34+
create database cwpc10;
35+
36+
-- select database
37+
use cwpc10;
38+
39+
-- delete database
40+
-- drop database cpwc10;
41+
42+
43+
-- create table
44+
create table employee(
45+
id int,
46+
name varchar(100),
47+
city varchar(100)
48+
);
49+
50+
-- show table
51+
select * from employee;
52+
53+
-- Date 14 March 2026
54+
-- create table
55+
create table info(
56+
id int primary key,
57+
name varchar(100),
58+
dob date,
59+
salary int,
60+
mobile varchar(100),
61+
dept enum('it','sales','hr','other'),
62+
city varchar(100),
63+
height float
64+
);
65+
66+
-- show all table list
67+
show tables;
68+
69+
-- show table records
70+
select * from info;
71+
72+
-- insert record into table
73+
insert into info (id,name,dob,salary,mobile,dept,city,height)
74+
value(101,'Sejal','1990-02-23',25000,'9876543210','sales','mumbai',5.6);
75+
insert into info (id,name,dob,salary,mobile,dept,city,height)
76+
value(102,'raj','1990-02-23',25000,'9876543210','sales','mumbai',5.6);
77+
insert into info (id,name,dob,salary,mobile,dept,city,height)
78+
value(103,'ashwin','1990-02-23',25000,'9876543210','hr','mumbai',5.6);
79+
insert into info (id,name,dob,salary,mobile,dept,city,height)
80+
value(104,'Afab','1990-02-23',25000,'9876543210','it','mumbai',5.6);
81+
82+
83+
insert into info (id,name,dob,salary,dept,city,height)
84+
value(105,'Joy','1990-02-23',25000,'it','mumbai',5.6);
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+

0 commit comments

Comments
 (0)