Page 160 - SQL
P. 160
Id FName LName DeptId
1 James Smith 3
2 John Johnson 4
Departments table:
Id Name
1 Sales
2 Marketing
3 Finance
4 IT
Simple select statement
* is the wildcard character used to select all available columns in a table.
When used as a substitute for explicit column names, it returns all columns in all tables that a
query is selecting FROM. This effect applies to all tables the query accesses through its JOIN
clauses.
Consider the following query:
SELECT * FROM Employees
It will return all fields of all rows of the Employees table:
Id FName LName DeptId
1 James Smith 3
2 John Johnson 4
Dot notation
To select all values from a specific table, the wildcard character can be applied to the table with
dot notation.
Consider the following query:
SELECT
Employees.*,
Departments.Name
https://riptutorial.com/ 142

