SQL Select statement in database systems

What is the SELECT statement?

The select statement is used to display the values from the table.

RollNo Name Fee
1 Sameed 10,000
2 Shahzeb 10,000
3 Basit 0.00

Table 1: student

Example 1:

Query on table 1: SELECT * FROM student;

Result:

RollNo Name Fee
1 Sameed 10,000
2 Shahzeb 10,000
3 Basit 0.00

Query show the resultant table: student


Example 2:

Query on table 1: SELECT RollNo, Name FROM student;

Result:

RollNo Name
1 Sameed
2 Shahzeb
3 Basit

Query show the resultant table: student


Example 3:

Query on table 1: SELECT RollNo FROM student;

Result:

RollNo
1
2
3

Query show the resultant table: student