Thursday, April 27, 2006

Oracle: row-wise comparison

I had a query that needed to compare two columns in a row andwas making two queries to do so. All hail the row-wise comparison!
select id from p4_versions
where (versionof, version) = (select id, headver from p4_files
      where p4path like '%/date.txt');