in Education by
I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the temporary table. Can anybody help in in viewing the contents of the temporary table at run time. Thanks Vinod T JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
There are several kinds of temporary tables, I think you could use the table which is not dropped after SP used it. Just make sure you don't call the same SP twice or you'll get an error trying to create an existing table. Or just drop the temp table after you see it's content. So instead of using a table variable (@table) just use #table or ##table From http://arplis.com/temporary-tables-in-microsoft-sql-server/: Local Temporary Tables Local temporary tables prefix with single number sign (#) as the first character of their names, like (#table_name). Local temporary tables are visible only in the current session OR you can say that they are visible only to the current connection for the user. They are deleted when the user disconnects from instances of Microsoft SQL Server. Global temporary tables Global temporary tables prefix with double number sign (##) as the first character of their names, like (##table_name). Global temporary tables are visible to all sessions OR you can say that they are visible to any user after they are created. They are deleted when all users referencing the table disconnect from Microsoft SQL Server.

Related questions

0 votes
    I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 18, 2022 in Education by JackTerrance
0 votes
    How do I do a SELECT * INTO [temp table] FROM [stored procedure]? Not FROM [Table] and without defining [ ... not supply any columns. Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    This is a question I asked on another forum which received some decent answers, but I wanted to see ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I'm trying to write a query that will pull back the two most recent rows from the Bill table ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I have a rating system in which any person may review other. Each person can be judged by one person more than once. For the ... SQL? Person 1 rates Person 2 with 5 on 1.2.2011...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    I have a rating system in which any person may review other. Each person can be judged by one person more than once. For the ... SQL? Person 1 rates Person 2 with 5 on 1.2.2011...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I try to select the Products that has a yearmodel between +1 and -1 the current year. And I only ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    I try to select the Products that has a yearmodel between +1 and -1 the current year. And I only ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    ____________ is a special type of stored procedure that is automatically invoked whenever the data in the table is ... part 3 topic in portion Transactions of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    Which SQL server table is used to hold the stored procedure scripts?...
asked Nov 9, 2020 in Technology by Editorial Staff
0 votes
    I've never used the Global Temporary Tables however I have some questions how they will work in a php ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I've never used the Global Temporary Tables however I have some questions how they will work in a php ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    I can think of two main benefits: Avoiding concurrency problems, if you have many processes creating/dropping ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
...