On Mon, Jul 07, 2003 at 05:58:00PM -0400, Mike Mascari wrote:
> 2. I've found the following syntax to perform better, although I'm not
> sure of its portability:
>
> UPDATE stockline SET status = 3
> WHERE stockline.id = lap_mpdetail_view.id AND
> lap_mpdetail_view.lap = 3976;
Very un-portable. PGSQL is the only database I know of that will
construct a FROM clause for you on it's own. You should at least add
FROM lap_mpdetail_view
to the update. Even that isn't highly portable, though at least some
databases support that syntax. (Sybase and MS SQL come to mind).
--
Jim C. Nasby, Database Consultant jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"