HighDots Forums  

mysql q.....

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss mysql q..... in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alexander Ross
 
Posts: n/a

Default mysql q..... - 11-01-2005 , 12:49 PM






Lets say I have two tables: tbl_cars (vin,make, model, color..._ and
tbl_inspection(vin,emissions, brakes, gas...) and I want to select all cars
that have not yet been inspected. Is there a way to do this with one SQL
statement or do I have to SELECT * FROM cars and run through each one to
check if its been inspected?

Thanks!

Alex



Reply With Quote
  #2  
Old   
bregent
 
Posts: n/a

Default Re: mysql q..... - 11-01-2005 , 01:25 PM






An easy way is to perform an outer join to bring back all rows from tbl_cars and then test for null values in tbl_inspection:
where tbl_inspection.vin is null

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.