Overview of Tables in SQL

Tables are the fundamental way to store data in a relational database management system. It contains a header row at the top of the table, which gives the list of column names, followed by rows that contain data. We will discuss the basic operations performed on a database by using important SQL operators.

Watch this SQL Create Table video

In this tutorial section, we will discuss the overview of tables in SQL

What Is a Table in SQL?

A table is a database object which is composed of rows and columns in SQL. In simple terms, it’s a collection of related data held in a table format.

Numerous tables may be present in a database. The table will list the number of columns but not the number of rows because the latter is arbitrary.What Is a Table?

Let’s select the Student Details table from the school database used as the previous example. Any number of student information can be placed into the Student Details table, however, the columns should all be confined to and related to one another, such as Student_Name, Student_ID, Age, BOD, Address, and Percentage of Marks.

The snapshot displays a table from an Employee Database, which contains employee details.

Kick-start your career in SQL with the perfect SQL Training Course now!

Get 100% Hike!

Master Most in Demand Skills Now !

Records and Fields in SQL

In a table, there are rows and columns, with rows referred to as records and columns referred to as fields. A column consists of data values of a specific type, such as numbers or alphabets, with each row in the database having one value for that column.

Examples of columns include Age, Student_ID, or Student_Name. On the other hand, a row represents a singular data item within a table, and all rows in the table have the same structure. For instance, Shaze in the Student_Name column or 007 in the Student_ID column.

Let us understand fields and records in detail.

Curious about how data is stored and manipulated? Want to learn about it? Here is the Database Course provided by Intellipaat.

Fields in SQL

Fields are basically columns in a table with specific information about the data.

Consider the snapshot below. There is an e_salary field in the table that provides information about the salaries of different employees. Similarly, the e_age field provides information about the age of different employees.Fields in SQL

Read on: SQL constraints to enhance your knowledge!

Records in SQL

A record is basically an individual entry that exists in a table. Records give complete information about a single entry or entity. Consider the snapshot below. One row is selected, i.e., Anne. This row gives complete information about the particular employee, Anne.

Records in SQL

So, now we know that a collection of records and fields makes a table, and a collection of tables makes a database. In the next tutorial section, we will discuss the basic operations performed on a database.

Wish to crack SQL job interviews? Intellipaat’s Top SQL Interview Questions are meant only for you!

Become a Database Architect

Course Schedule

Name Date Details
SQL Training 30 Mar 2024(Sat-Sun) Weekend Batch
View Details
SQL Training 06 Apr 2024(Sat-Sun) Weekend Batch
View Details
SQL Training 13 Apr 2024(Sat-Sun) Weekend Batch
View Details