Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the four system tables in SQL SERVER?

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces what the four system tables in SQL SERVER are, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.

There are four system tables in SQL SERVER

Master, model, msdb,tempdb. What is the use of these four watches?

Generally speaking, we developers rarely pay attention to these four tables in the use of DB. But these four watches personally feel very important, and it will be good for me to master some basic knowledge, so I wrote it down.

The master table holds the system information of SQL server and is used to track the entire SQL system.

Model, this is a template table. You can get a copy based on this table, that is to say, if you want to change the style of the new standard database, you can change the model as needed, which is the template for the new DB.

Msdb is the place where the SQL agent process saves any system task

As the name implies, tempdb is the main workspace of the server, executing complex queries, and if you need to create an intermediate table, then the intermediate table is in tempdb. The temporary table created is also in tempdb

For example:

Select tempT.a from (select * from salars) as tempT

The select * from salars here forms a temporary intermediate table, so the table is stored in tempdb

Each time SQL is restarted, the data in tempdb will be completely rebuilt. So you can't store permanent data in this table.

Thank you for reading this article carefully. I hope the article "what are the four system tables in SQL SERVER" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report