A stored procedure, several results, how to display, stored procedure, and display

Source: Internet
Author: User

A stored procedure, several results, how to display, stored procedure, and display

Some netizens on the Forum asked:
"

The stored procedure of the Three-table join query has three tables. How can I use the GridView to display the results?

"

No detailed Problem description was provided. Understand Insus. NET and solve the following problem: in the database, create a stored procedure, slightly over three table associations, so that it can only have three results

 

Go to the asp.net site, we use the following logic to process class library http://www.cnblogs.com/insus/p/3826706.html under the App_Code directory, create an Info class:



Create a webpage, such as Default. aspx, and pull three GridView controls:



In Default. aspx. cs:


The following figure shows the effect of running a webpage:


How can I display the query results in the stored procedure?

It may be that the database you created is not in the database you modified ..
 
Let's take a look at how to write SQL statements or stored procedures. I want to add a piece of data to the results shown in the figure.

Write a temporary table variable and save your result set as @ tempTable

Insert
Insert @ tempTable (Field 1, Field 2...) values (value 1, value 2 ...)

Select * from @ tempTable

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.