[Rails] ActiveRecord: It's not only quoting

Michael Koziarski koziarski at gmail.com
Fri Dec 17 08:34:29 GMT 2004


On Fri, 17 Dec 2004 10:25:42 +0200, Jarkko Laine <jarkko at jlaine.net> wrote:
> 
> On 17.12.2004, at 10:06, <contact at maik-schmidt.de> wrote:
> >
> > Additionally, most of the "SELECT" statements will not work with NULL
> > values. In DB2 it's not possible to run a statement like "SELECT * FROM
> > x WHERE y = NULL". It has to be "SELECT * FROM x WHERE y IS NULL".
> 
> I think the latter is the SQL standard and works for sure in Oracle and
> PostgreSQL.

Yes,  is null is the standard, it works with mysql too.

> >
> > I've found some SQL statements using the "LIMIT" clause. This does not
> > exist in DB2 (at least not in Version 7) and it has to be replaced by
> > "fetch first <x> rows only". In Oracle I've always used "WHERE ROWNUM <
> > x" and I do not know, if Oracle has a "LIMIT" keyword.
> 
> No, it doesn't, at least in 8i. You have to use the rownum trick.
> 
> >
> > I think it's not a good idea to clutter the code base with esoteric
> > DB2/Oracle/... knowledge. Any suggestions?
> 
> I think limiting the result set is crucial and the adapter needs to
> know how to handle that.
> 
> //jarkko
> 
> >
> > Cheers,
> >
> > Maik
> > _______________________________________________
> > Rails mailing list
> > Rails at lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> --
> Jarkko Laine
> http://jlaine.net
> 
> 
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
> 
> 
> 
> 


-- 
Cheers

Koz


More information about the Rails mailing list