Let's start from the displaying data from database's table.
When we think about calling data from the database, what command will be use to call out records from the table.
Let's see at this SELECT Command which is:
SELECT [COLUMN NAME] FROM [TABLE NAME]
It's look similar with what the Basic English look like:
SELECT one column of Information FROM a database's Table
EXAMPLE :
Table GameScores
PlayerName | Department | Scores |
Jason | IT | 3000 |
Irene | IT | 1500 |
Jane | Marketing | 1000 |
David | Marketing | 2500 |
Paul | HR | 2000 |
James | HR | 2000 |
1. SQL statement for Select Single Column from Table
SELECT PlayerName FROM GameScores
Result:
PlayerName |
Jason |
Irene |
Jane |
David |
Paul |
James |
2. SQL Statement for Select All Column from Table
SELECT * FROM GameScores
Result:
PlayerName | Department | Scores |
Jason | IT | 3000 |
Irene | IT | 1500 |
Jane | Marketing | 1000 |
David | Marketing | 2500 |
Paul | HR | 2000 |
James | HR | 2000 |