SQL SELECT Statement
SQL SELECT Statement:-



SQL SELECT statement is used to fetch selected data that follows the condition we want.
In simple words, we can say that the SELECT statement is used to query or retrieve data from a table in the database.
Syntax of the SELECT statement:-
SELECT column1,column2, ...
FROM table_name;
Here column1,column2, ... are the field names of the table that we want to select data from.
If you want to fetch all the field available in the table, use the following syntax:
SELECT * FROM table_name;
Example:-
Consider the STUDENT table having the following records:-
The following SQL statement selects the column "Name", "Email", "city" from the "student" table.
SELECT Name, Email, city FROM student;
OUTPUT:-
SELECT * EXAMPLE:-
The following SQL statement selects all the columns from the "student" table:-
SELECT * FROM student;
OUTPUT:-
Comments
Post a Comment