How to get the returned data from the SQL Server stored procedure

Source: Internet
Author: User
1. Returns a value
DECLARE @count int exec @count = testreturn \ ' 111\ ', \ ' 222\ ' select @count
@count is the value returned is the INT type

2. Return a data table

Start by creating a new data table
CREATE TABLE Test (
tmp_order_id varchar (20)
)
The returned data is then inserted into the table

Get the contents of a table
SELECT * FROM Test
To delete a generated data table
DROP TABLE test;


For more details, refer to: http://blog.csdn.net/liangweiwei130/article/details/6691207

How to get the returned data from the SQL Server stored procedure

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.