0% found this document useful (0 votes)
4 views1 page

03 SQL Basics Study Notes

This document provides concise notes on SQL basics, covering key database concepts, basic commands, SELECT examples, joins, and aggregate functions. It explains the structure of databases, how to manipulate data using SQL commands, and the use of joins to connect tables. The notes are intended for educational purposes and should be shared only if permitted by platform rules.
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)
4 views1 page

03 SQL Basics Study Notes

This document provides concise notes on SQL basics, covering key database concepts, basic commands, SELECT examples, joins, and aggregate functions. It explains the structure of databases, how to manipulate data using SQL commands, and the use of joins to connect tables. The notes are intended for educational purposes and should be shared only if permitted by platform rules.
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

SQL Basics Study Notes

This document contains original, concise notes prepared for learning and revision. You may upload/share it only if the
platform rules allow educational notes and you are comfortable sharing it publicly.

Database Concepts
• A database stores related data in an organized form.

• A table contains rows and columns.

• A primary key uniquely identifies each row.

• A foreign key connects one table with another table.

Basic Commands
• CREATE is used to create database objects.

• INSERT adds new records.

• SELECT retrieves data.

• UPDATE modifies existing records.

• DELETE removes records.

SELECT Examples
• SELECT * FROM students; shows all columns.

• SELECT name, mark FROM students; shows selected columns.

• WHERE filters records.

• ORDER BY sorts records.

• LIMIT restricts number of results.

Joins
• INNER JOIN returns matching records from both tables.

• LEFT JOIN returns all rows from left table and matching rows from right table.

• Joins are used when data is split across multiple tables.

Aggregate Functions
• COUNT() counts rows.

• SUM() adds values.

• AVG() gives average.

• MAX() gives highest value.

• MIN() gives lowest value.

• GROUP BY groups similar records.

Original study notes - created for educational use Page 1

You might also like