Use the Exit statement if you run into a condition where a script should quit. The script breaks whenever you call exit from within your script. Add a number to Exit to set the error level (return code). The caller of your script can then check the automatic variable $LASTEXITCODE to see if the script ended prematurely and determine its exit code.
Exit a Script Immediately
Categories
- Free tools
- SQL Admin Toolset
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Doctor
- SQL Enterprise Job Manager
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime