Aracılığıyla paylaş


Çoklu-satır kümesi sonuçları oluşturma komutları

The SQL Server Native Client OLE DB provider can return multiple rowsets from SQL Server statements.SQL Server statements return multiple-rowset results under the following conditions:

  • sql deyimlerini toplanmış, tek bir komut olarak gönderilir.

  • Saklı yordamlar uygulamak sql deyimlerinin bir toplu iş iş işlemi.

  • sql deyimleri dahil Transact-SQL compute veya compute by yan tümce tümce tümce.

Toplu işlemleri

The SQL Server Native Client OLE DB provider recognizes the semicolon character as a batch delimiter for SQL statements:

WCHAR*       wSQLString = L"SELECT * FROM Categories; "
                          L"SELECT * FROM Products";

Birden çok sql deyimlerinin bir toplu iş iş gönderme ayrı ayrı her SQL deyim yürütüp çok daha etkilidir.Tek bir toplu iş iş gönderme azaltır ağ durumsa dan istemci sunucu.

Saklı yordamlar

SQL ServerHer deyimnde için ayarlanmış bir sonuç döndürür bir saklı yordam, bu nedenle çoğu SQL Server saklı yordams dönüş birden çok sonuç kümeleri.

compute ve compute bu

The Transact-SQL COMPUTE BY clause generates subtotals within a SELECT statement result set.compute yan tümce tümce tümce, sonunda bir toplam oluşturur sonuç küme.The SQL Server Native Client OLE DB provider returns each COMPUTE BY subtotal and the COMPUTE total as a separate rowset result.

Ayrıca bkz.

Kavramlar