0% found this document useful (0 votes)
12 views2 pages

MySQL Basics Notes

MySQL is an open-source Relational Database Management System that uses SQL to manage data in tables. Key SQL commands include CREATE, INSERT, SELECT, UPDATE, and DELETE, with examples provided for creating a database and table, inserting data, and performing queries. Important tips include using WHERE with UPDATE and DELETE, and practicing queries regularly for mastery.

Uploaded by

iitjee8113
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

MySQL Basics Notes

MySQL is an open-source Relational Database Management System that uses SQL to manage data in tables. Key SQL commands include CREATE, INSERT, SELECT, UPDATE, and DELETE, with examples provided for creating a database and table, inserting data, and performing queries. Important tips include using WHERE with UPDATE and DELETE, and practicing queries regularly for mastery.

Uploaded by

iitjee8113
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MySQL Basics – PDF Notes

1. What is MySQL?
MySQL is an open-source Relational Database Management System (RDBMS). It stores data in
tables and uses SQL (Structured Query Language) to manage data.

2. Basic SQL Commands


• CREATE – Used to create database or table

• INSERT – Used to insert data into table

• SELECT – Used to retrieve data

• UPDATE – Used to update existing data

• DELETE – Used to delete data

3. Create Database & Table


CREATE DATABASE school;
USE school;

CREATE TABLE students (


id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50),
age INT,
marks INT
);

4. Insert Data
INSERT INTO students (name, age, marks)
VALUES ('Rahul', 18, 85);

5. Select Queries
SELECT * FROM students;
SELECT name, marks FROM students;
SELECT * FROM students WHERE marks > 80;

6. Update & Delete


UPDATE students SET marks = 90 WHERE name = 'Rahul';
DELETE FROM students WHERE name = 'Aman';

7. Aggregate Functions
• COUNT() – Total rows

• AVG() – Average value

• MAX() – Maximum value


• MIN() – Minimum value

• SUM() – Total sum

8. Important Tips
• Always use WHERE with UPDATE and DELETE

• SQL keywords are not case-sensitive

• Practice queries daily for mastery

You might also like