In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about what is a global variable in SQLServer. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
What is the global variable of SQLServer
@ @ SERVERNAME: returns the name of the local server running SQLServer2000.
@ @ REMSERVER: returns the name of the remote SQLServer server recorded in the login record.
@ @ CONNECTIONS: returns the number of connections or attempts to connect since the last time SQLServer was started, which makes it easy for managers to know all the attempts to connect to the server today.
@ @ CURSOR_ROWS: returns the number of eligible rows that currently exist in the last connected and opened cursor.
@ @ ERROR: returns the error code of the last executed Transact-SQL statement.
@ @ ROWCOUNT: returns the number of rows affected by the previous statement, and any statement that does not return a row sets this variable to 0.
@ @ VERSION: returns the date, version, and processor type of SQLServer's current installation.
@ @ CPU_BUSY: returns the working time of CPU in milliseconds since SQLServer was last started.
@ @ DATEFIRST: returns the value of the DATAFIRST parameter assigned using the SETDATEFIRST command. The SETDATEFIRST command is used to specify what day of the week the first day of the week is.
@ @ DBTS: returning the timestamp value of the current database must ensure that the timestamp value in the database is unique.
@ @ FETCH_STATUS: returns the status value of the last FETCH statement.
@ @ IDENTITY: returns the column value of the identity column that was last inserted into the row.
@ @ IDLE: returns the time, in milliseconds, that CPU has been in an empty state since SQLServer was last started.
@ @ IO_BUSY: returns the time (in milliseconds) that CPU has taken to perform input and output operations since SQLServer was last started.
@ @ LANGID: returns the ID value of the language currently in use.
@ @ LANGUAGE: returns the name of the language currently in use.
@ @ LOCK_TIMEOUT: returns the amount of time the current session waits for a lock in milliseconds.
@ @ MAX_CONNECTIONS: returns the maximum number of connections allowed to the SQLServer.
@ @ MAX_PRECISION: returns the accuracy of the decimal and numeric data types.
What is the global variable of SQLServer
@ @ NESTLEVEL: returns the nesting level of the currently executed stored procedure, with an initial value of 0.
@ @ OPTIONS: returns information about the current SET option.
@ @ PACK_RECEIVED: returns the number of input packets read by SQLServer over the network.
@ @ PACK_SENT: returns the number of output packets written by SQLServer to the network.
@ @ PACKET_ERRORS: returns the number of errors in network packets.
@ @ PROCID: returns the ID value of the current stored procedure.
@ @ SERVICENAME: returns the service status in which SQLServer is running, such as MSSQLServer, MSDTC, SQLServerAgent.
@ @ SPID: returns the server processing ID value processed by the current user.
@ @ TEXTSIZE: returns the TEXTSIZE option value of the SET statement. The SET statement defines the text or image in the SELECT statement. The basic unit of the maximum length of a data type is bytes.
@ @ TIMETICKS: returns the number of microseconds per clock.
@ @ TOTAL_ERRORS: returns the number of disk read and write errors.
@ @ TOTAL_READ: returns the number of disk reads.
@ @ TOTAL_WRITE: returns the number of disk writes.
@ @ TRANCOUNT: returns the number of active transactions in the current connection.
After reading the above, do you have any further understanding of what is a global variable in SQLServer? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.