In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about how to use temporary tables in SQL server. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
As an example, it is clearer to take a look at the local temporary table, [New query], and enter the following text in it:
After running, we input select * from # tempTable in this file. After execution, we can query the following data:
We open another [New query], name it New query 2, and enter: select * from # tempTable in New query 2. Prompt as follows:
Change the # tempTable in the Sql statement to # # tempTable, and execute it again according to the above method. You will find that the error is no longer prompted in the new query 2, and the same result can be found in the new query 1. Why?= > Local temporary tables are visible only in the current session; global temporary tables are visible in all sessions.
Note that after using the global temporary table, don't forget to drop it with drop table. However, if you use a local temporary table, you don't have to do this, and the system automatically reclaims the created local temporary table at the end of the current session.
The above is how to use temporary tables in SQL server. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.