[thelist] SQL: Insert with Sub Queries

Casey Crookston caseyc at IntelliSoftmn.com
Tue Jun 20 09:20:20 CDT 2006


What would be the correct way to build this query:

 

INSERT INTO photos (vehicleID, photo, isMain, sortOrder) VALUES
((SELECT vehicleID FROM Vehicles), (SELECT vehicleimage FROM  Vehicles),
'Yes', 1)

 

Thanks,

 

Casey




More information about the thelist mailing list