2009-Гру-18, П'ятниця

Method In/Out Rewrite callee? Required versionComment

OUTPUT Parameters
OutputYes  Not generally applicable, but sometimes overlooked.
Table-valued Functions Output Yes   Often the best choice for output-only, but there are several restrictions.

Inline Functions
Use this to reuse a single SELECT.

Multi-statement Functions
When you need to encapsulate more complex
logic.
Using a Table In/Out Yes   The most general solution. My favoured choice for input/output scenarios.
Sharing a Temp Table Mainly for a single pair of caller/callee.

Process-keyed Table
Best choice for many callers to the same callee.

Global Temp Tables
A variation of process-keyed.
Table-valued Parameters InputYesSQL 2008 Mainly useful when passing data from a client.

INSERT-EXEC
OutputNo  Deceivingly appealing, but should be used sparingly.

Using the CLR
OutputNoSQL 2005 Complex, but useful as a last resort when INSERT-EXEC does not work.

OPENQUERY
OutputNo  Tricky with many pitfalls. Discouraged.

Using XML
In/OutYesSQL 2005 A bit of a kludge, but not without advantages.
Using Cursor Variables OutputYes  Not recommendable.

Read there ...

Лютий 2022

Н П В С Ч П С
  12345
6789101112
13141516171819
202122232425 26
2728     

За стиль дякую

Створено з Dreamwidth Studios
Сторінка створена 2025-Чер-06, П'ятниця 21:51