Global variable format: @@***
These variables are system-maintained and do not require our own definition, and are generally used to view information. The most used @ @error in the stored procedure to determine if there is an error message.
One, @ @version: View version information
Two, @ @identity: View the current identity, followed by the INSERT statement
6 of the last face with the largest ID. After an INSERT statement is executed
Insert into Sdetail (Sname,sscore,sgender) VALUES (' da Vinci ',0) Select @ @IDENTITY
Execution Result: 7
Three, @ @servername: View server name
Iv.@ @error: Returns the error number of the last executed code, if no error is returned 0; if the North go interrupt is not available
V. @ @rownumber: View the number of affected rows that last executed a line of code
On, baby
Global variables in SQL Server, not many of the common ... I'll see you later.