SQL Select Query – SQL TUTORIAL | Software Testing Material
SQL Select Query:
SQL Select Query is used to select data from a Database.
Syntax:
SELECT column_name_1, column_name_2, .. column_name_n FROM table_name;
or
SELECT *Â FROM table_name
where * represents all the columns of the table.
Example:
To get all the records from a table. I have a sample table named ‘SCOREBOARD’. Using the Select query, we could get all the records from the table.
Check this post on how to create a table in SQL.
SELECT * FROM SCOREBOARD;
To get particular column records from a table using SQL Select Query:
Syntax:
SELECT column_name_3Â FROM table_name;
Example:
By using the below code, we could fetch just from one particular column say ‘Playername’ from the table ‘SCOREBOARD’
SELECT Playername FROM SCOREBOARD;
In the next tutorial, we will see How To Use Where Clause In SQL
Check out the complete SQL Tutorial by clicking on below link: