Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What are tables?
#7
(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?
Reply


Messages In This Thread
What are tables? - by nevets04 - 12-21-2009, 12:56 PM
RE: What are tables? - by Gaijin - 12-21-2009, 01:10 PM
RE: What are tables? - by wat - 12-21-2009, 01:18 PM
RE: What are tables? - by Gaijin - 12-21-2009, 01:21 PM
RE: What are tables? - by wat - 12-21-2009, 01:44 PM
RE: What are tables? - by nevets04 - 12-21-2009, 03:56 PM
RE: What are tables? - by wat - 12-21-2009, 04:15 PM
RE: What are tables? - by nevets04 - 12-21-2009, 07:44 PM
RE: What are tables? - by wat - 12-21-2009, 07:48 PM
RE: What are tables? - by nevets04 - 12-21-2009, 07:51 PM
RE: What are tables? - by Gaijin - 12-21-2009, 07:54 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)