Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable number of parameters to sql stored procedures
Message
De
22/07/2007 17:34:19
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01242588
Message ID:
01242640
Vues:
32
Yes. He shows different execution plans.

Sure... but as Walter has observed repeatedly, this sort of technique seems to assume that NULL is not used in database fields.

If people are thinking about using parameterized SP for generalized queries, they would be well advised to carefully consider the use of NULL, especially for SQL Server Datetime and date fields.

This isn't necessarily a criticism of the technique- normalization purists might observe that if a column often contains null then it should be in a separate table. That's not what happens in practice, though. It needs careful consideration in advance IMHO.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform