Re: Which syntax would be better for performance?
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 07/15/04
- Next message: Keith Tate: "Re: Which syntax would be better for performance?"
- Previous message: Joe Celko: "Re: Parent child"
- In reply to: Keith Tate: "Which syntax would be better for performance?"
- Next in thread: Adam Machanic: "Re: Which syntax would be better for performance?"
- Reply: Adam Machanic: "Re: Which syntax would be better for performance?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 15 Jul 2004 13:25:50 -0700
I would go with "mycolumn = COALESCE(@myparm, mycolumn)" since it is
easier to read and writem and the COALESCE() can be extended to several
values:
mycolumn = COALESCE(@myparm_1, @myparm_2, @myparm_3, mycolumn)"
This lets you write a lot of logical controls in a function notation and
avoid IF-THEN-ELSE control flow or CASE expressions.
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Keith Tate: "Re: Which syntax would be better for performance?"
- Previous message: Joe Celko: "Re: Parent child"
- In reply to: Keith Tate: "Which syntax would be better for performance?"
- Next in thread: Adam Machanic: "Re: Which syntax would be better for performance?"
- Reply: Adam Machanic: "Re: Which syntax would be better for performance?"
- Messages sorted by: [ date ] [ thread ]