In this tutorial, you will learn how to use the SELECT statement is used to retrieve records from one or more tables in your SQL database.. The data returned is stored in a result table.
SELECT Syntax
SELECT col1, col2, ... FROM table_name;
Here, col1, col2, ... are the field names of the table you want to select data from. If you want to select all the fields available in the table, use the following syntax:
In this
SELECT
statement:- First, specify the table name from which you want to query the data.
- Second, indicate the columns from which you want to return the data. If you have more than one column, you need to separate each by a comma (,)
SELECT * FROM table_name;
SELECT Column Example
SELECT First_name, City FROM Employees;SELECT * Example
The following SQL statement selects all the columns from the "Employees" table:
SELECT * FROM Employees;
0 comments:
Post a Comment