@@TOTAL_ERRORS function returns the number of disk read/write errors encountered by SQL Server since last started.
Syntax of @TOTAL_ERRORS Function :
@@TOTAL_ERRORS
Return type of @@TOTAL_ERRORS function is an integer.
Examples of @@TOTAL_ERRORS Function :
Example 1 : Use of @@TOTAL_ERRORS function in select clause
Output
Above example returns 0 errors occurred in sql server since last started.