100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary MySQL

Rating
-
Sold
-
Pages
6
Uploaded on
03-03-2022
Written in
2021/2022

My SQL notes with Codes and steps to run the codes.

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
March 3, 2022
Number of pages
6
Written in
2021/2022
Type
Summary

Subjects

Content preview

My SQL
What is database : collection of organized data
DBMS : Software used to perform several operations on databases .
{System that manages collection of data in database }
SQL : SQL is a language which is used to perform database operation

RDBMS : Relational DataBase Management System : It is a type of DBMS;
The relationship between tables is established.

Coding In MySQL
Open MySql and click LocalinstanceMySQL80 and give the password {1234}.




Click this create schema icon..and add a schema name..and apply..

—------------------------------------------------------------

, Code
create Table employee(ID INT,Name VARCHAR(10),address varchar(20));
select * from employee;

insert into employee(ID,Name,address) values(101,'naga','hyd');
insert into employee(ID,Name,address) values(102,'vara','pune');
insert into employee(ID,Name,address) values(103,'chinna','andama');
insert into employee(ID,Name,address) values(104,'nagakata','andaman');

alter table employee ADD (sal varchar(5)); # add a column
alter table employee drop column sal; # drop a column

select * from employee;
truncate Table employee; #truncate - remove all records from table
drop Table employee; #drop table - remove table completely
—-----------------------------------------------------------------------------------------------------------------
create Table employee(ID INT,Name VARCHAR(5),age INT,salary INT,DOB DATE);
insert into employee(id,name,age,salary,DOB) values(1,'vara',31,20000,'1986-07-14');
insert into employee(id,name,age,salary,DOB) values(2,'naga',31,25000,'1989-12-17');
insert into employee(id,name,age,salary,DOB) values(3,'vara',31,18000,'1987-08-04');
insert into employee(id,name,age,salary,DOB) values(4,'vara',31,20100,'1980-09-22');
insert into employee(id,name,age,salary,DOB) values(5,'vara',31,27000,'1992-02-01');

select * from employee;

select min(salary) from employee; #minimum salary from employee
select min(dob) AS Minimum_Emp_dob from employee; #minimum DOB
select max(salary) from employee; #maximum salary
select sum(salary) AS Employee_Salry_sum from employee; #sum of all salaries
select count(*) from employee #total number of employees
$5.48
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
aardra

Also available in package deal

Get to know the seller

Seller avatar
aardra amrita
Follow You need to be logged in order to follow users or courses
Sold
3
Member since
3 year
Number of followers
3
Documents
3
Last sold
2 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions