wiki:dbSQLProgStyle
Last modified 11 years ago Last modified on 10/17/2008 12:17:35 PM

LSST SQL Programming Style

LSST Database

Use ANSI JOIN syntax instead of the SQL-89 syntax

Example. Use:

SELECT s.taiMidPoint
FROM Raw_Amp_Exposure r
JOIN Source s USING(ampExposureId)
WHERE s.objectId = 1234 

Instead of:

SELECT s.taiMidPoint
FROM Raw_Amp_Exposure r, Source s
WHERE r.ampExposureId = s.ampExposureId
AND  s.objectId = 1234