数据表中的数据表名称更改 [英] Data Table Name Change in Data Set

查看:89
本文介绍了数据表中的数据表名称更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have a SQL stored procedure with simple select statements that returns multiple datatables within the dataset.  The stored procedure is being called from C#/.NET code.
Dataset ds = new Dataset();
ds = return Dataset 

The stored procedure is returning the data but the datatable names end up Table, Table1, Table2,...  when the dataset is received on the .NET side.  Is there a way to define the datatable name within the stored procedure that will be used in the dataset and seen on the .NET side?

推荐答案

只需使用AS sql语句。



Just use AS sql statement.

SELECT * FROM Table1 AS AnotherNameForTable.


这篇关于数据表中的数据表名称更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆