CREATE PROCEDURE [dbo].[TitlesPerPublisher] AS Begin SELECT Pub_Id, Title, Price FROM Titles SELECT Pub_ID, Pub_Name FROM Publishers End 夠簡單吧!這段代碼提交兩個 select 語句,因而將返回兩個行集。
public DataRow[] GetChildRows(DataRelation); public DataRow[] GetChildRows(string); public DataRow[] GetChildRows(DataRelation, DataRowVersion); public DataRow[] GetChildRows(string, DataRowVersion); 類似的方法還有 GetParentRow 和 GetParentRows 。它們根據子列返回父列的名字。