Learn SQL Easily

Master SQL and database management with our beginner-friendly tutorials. Get free code snippets, practical query examples, and step-by-step guides to build, manage, and optimize modern databases. Whether you’re a student or developer, our easy SQL lessons help you write efficient queries, understand database design, and improve your programming skills..

Start Learning Browse Snippets

Latest Tutorials

Xampp Installation

Learn how to install xampp.

Read More

CMD command

Start xampp server with cmd command.

Read More

Create database

Create database in xampp server.

Read More

Show databases

Show created databases.

Read More

Use database

Use created database.

Read More

Create table university

Create a new table in database.

Read More

Desc university

Show structure of the university table.

Read More

Create table student

Create another new table in database.

Read More

Desc student

Show structure of the student table.

Read More

Insert into university

Enter data into university table.

Read More

Insert into students

Enter data into student table.

Read More

Select all from university

Show data in all columns and rows from university table.

Read More

Select all from student

Shows all the columns and rows from the student table.

Read More

Select name from student

Displays only the name column from the student table.

Read More

Select name as "Undergraduates" from students

Displays the name column, but the output heading is renamed to Undergraduates.

Read More

Select indexno, name from students

Shows only the index number and name columns from the students table.

Read More

Select indexno, name as "Undergraduates" from students

Shows the index number and the name column, but names are displayed under the heading Undergraduates.

Read More

Select indexno, name as "Undergraduates" from students Order By indexno Desc

Displays index number and name (as Undergraduates) sorted by index number in descending order (largest to smallest).

Read More

Select indexno, name as "Undergraduates" from students Order By name Desc

Displays index number and name (as Undergraduates) sorted by name in descending alphabetical order (Z → A).

Read More

Select distinct name from students

Shows only unique names from the students table (removes duplicates). .

Read More

ALTER table university

Used to modify the structure of the university table (e.g., add, delete, or change columns). .

Read More

Desc university

Shows the structure (columns, types, keys) of the university table.

Read More

Select all from university

Displays all data from the university table.

Read More

Update university

Used to change/update data in the university table.

Read More

Select all from university

Displays all data from the university table.

Read More

Select payment from university where name like 'university of technology'

Shows the payment column for the university named “university of technology”.

Read More

Select payment all 1000 as "Income" from university where name like 'university of technology'

Adds 1000 to the payment and shows it under the heading Income.

Read More

Select count (IndexNo) from student where uniid like 'UOO1'

Counts the number of students in the student table whose university ID is UOO1.

Read More