Most of the database queries I run at some point are used to generate HTML and rather than go through the results of the query and add HTML to it in PHP or Ruby code, I like to get this out of the query itself.
So in MySQL my queries often look like this:
select concat(‘<a href=pagename.php?varid=”‘, varname, ‘”>’, varid, ‘</a>’) as varlink, …..
However for the same result in Oracle, which only allows two items in the concat function,
this turns into:
select concat(‘<a href=pagename.php?varid=”‘, concat(varname, concat(‘”>’, concat(varid, ‘</a>’)))) as varlink, …..
If there are multiple such items, the query becomes extremely ugly with too many brackets to keep track of.
My next complaint about Oracle is no magic quotes – string values must be in single quotes, no double quotes allowed.