Anyone good with SQL

  • Thread starter Thread starter Sem
  • Start date Start date
SHU?

Had our walkthru on Tuesday - was happy with 79%

herts uni

the problem is the deadline is meant to be monday and i was hoping to do it over the weekend
but monday is a bank holiday and uni is closed meaning tomorrow is the last day i can actually hand it in :mad:
 
Whats the problem anyways?

i need to select certains values from different tables

heres what im using

SELECT value1,value2,value3 FROM table1, value4,value5, FROM table2, WHERE value6='value7'

it wont work it says

sql statement not properly ended
 
cos you need to say value1 from table1, then value 2 from table 2 etc but not in those words, will find out.

this should have gone in the correct area as i was there and didn't see it and it was only by chance i came here and it caught my eye
 
google would have given you this answer quickly if what i read you want is correct, keywords being 'select multiple table mysql'.

here you go :)

Code:
SELECT employees.Firstname, employees.Lastname, crew.experience FROM 
employees, crew;
let me know it works so i can go to bed
 
Last edited:
SELECT table1.value1, table1.value2, table1.value3, table2.value4, table2.value5 FROM table1, table2 WHERE tableX.value6='Y';

Not sure how your where bit works, depends what you're trying to achieve.

I really think this would be better done with a proper JOIN...
 
i need to select certains values from different tables

heres what im using

SELECT value1,value2,value3 FROM table1, value4,value5, FROM table2, WHERE value6='value7'

it wont work it says

sql statement not properly ended

Among other things, the comma between table2 and WHERE could be screwing things up.
 
Back
Top Bottom