Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the four system tables in SQL SERVER?

Shulou Source: shulou.com Published: 2022-05-31 19:45:31 10月04日 Update

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!

Tags: Systems articles data that is templates knowledge complexity importance as the name implies individuals people values tasks information interests copies and at the same time places benefits that is to say Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL MariaDB Huawei Shulou Tech Info