12-21-2009, 04:15 PM
(12-21-2009, 03:56 PM)nevets04 Wrote: This makes no sence to me O.o. Im not really sure why. is
| user_id | salary | work_time | full_name | age |
actual syntax?
No, you have to think of it in a less practical sense. Imagine creating a table in a word document. At the top you have a title. user_id, salary, work_time, full_name, and age are your titles.
From here, each row contains information about the same person. For example, take a look at the following:
Code:
| user_id | salary | work_time | full_name | age |
| 1232 | $10h | 3 weeks | Martin smith | 20 |
That row contains information about a man named Martin Smith. Let's say you knew his name, but you wanted to find out what his salary is.
Your query would look something like
Code:
SELECT salary FROM Employees WHERE full_name = "Martin Smith"
SQL queries sort of make sense as you read them. This is selecting the salary column from the employees gable where the name is "Martin Smith". This will return $10h. Make sense?