Beginner

5. Database Row

Understand what a row represents and how individual records are stored inside a database table.

📘 Lesson 5 of 728 ⏱ 5 min 🎯 Beginner

A row represents one individual record in a database table. Every row contains values for the columns defined in that table. For example, if an Employees table contains EmployeeID, EmployeeName, Department, and Salary, one row contains the information belonging to one employee. If the table contains 5,000 employees, it will normally contain 5,000 employee records.

Many SQL operations work directly with rows. WHERE filters rows, ORDER BY sorts rows, UPDATE changes rows, DELETE removes rows, and GROUP BY can organize rows into groups. Understanding rows is therefore fundamental to understanding SQL.

Consider an employee record with EmployeeID 101, EmployeeName 'Rahul', Department 'Finance', and Salary 60000. All these values together make up one row in the Employees table.

SQL
SELECT
    *
FROM Employees
WHERE EmployeeID = 101;

A row can represent one employee, one customer, one product, one order, one transaction, one bank account, or any other individual business record.

  • A row represents one record.
  • A row contains values for the table columns.
  • Rows can be filtered.
  • Rows can be sorted.
  • Rows can be updated.
  • Rows can be deleted.
What is a row in a database?

A row represents one individual record stored in a database table.

What is another common name for a row?

A row is commonly referred to as a record or tuple.

Have you finished this lesson?

Introduction to SQL – All Lessons