An exception that is thrown when the database driver encounters an error. This tag could be used for both C# `SqlExpection` and Java `SQLException`.
C#
SqlException is thrown when ado.net encounters a SQL Server related error.
SqlException is the class used by System.Data.SqlClient library to represent an error either communicating with, or generated by, SQL Server.
For errors that are generated by the SQL Server, the Number property will contain SQL Server's error number and Class contains the severity. If there was more than one error or warning returned by the server, then the details of the exception will be populated by the first error\warning and any other errors and warnings can be viewed in the Errors property.
For communication errors, the Message will contain the error details from the network provider and, with .Net 4.5 and above, the InnerException will contain the relevant Win32Exception.
For more information onSqlException, see its MSDN page
Java
An exception that provides information on a database access error or other errors, could be thrown by jdbc driver. See official javadoc for more details.