Re: syntax of select for a left join
Posted in 1998
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Jun Yan wrote: > > Hi, can someone tell me the correct syntax for a left join? > > What I have is: > Table 1: > people's name|...|office building code|... > > Table 2: > building code | full name of buildings > > What I want is a list of all people with full building name, if someone > does not have an office, I still want it, just leave the building's name > blank. Informix only supports righ outer joins so in most cases this works fine, just reverse the mention of the tables: select table1.*, building_name from table2, outer table1 where table2.building_code = table1.building_code; Since the optimizer ignores the order the tables are mentioned the efficiency of the query should not be effected. Art S. Kagel