Re: MySQL and foreign-key support

[prev] [thread] [next] [lurker] [Date index for 2006/10/19]

From: David King
Subject: Re: MySQL and foreign-key support
Date: 18:35 on 19 Oct 2006
> MySQL still, after all these years, has a whole host of arbitrary
> limitations (like the limits on key length, and the inability to  
> use TEXT
> columns in a foreign key, and the lack of recursion in stored  
> functions).
> And there are still important features missing, whatever table  
> engine you
> use (like CHECK constraints, and deferred constraint checking).

Indeed, try something like this:

select foo from (
	select foo,bar from baz
	limit 5
) as quux;

"Limit not allowed in subselect".

Postgres seems to handle it fine.

select id from ( select id from products limit 1) as foo;
--
1

This is useful in limiting results based on something other than the  
total number of rows (for instance, limiting the number of categories  
returned without limiting the total number of rows)



Generated at 16:01 on 02 Nov 2006 by mariachi 0.52