SQL Escape Sequences

SQL Server 2005



The Microsoft SQL Server 2005 JDBC Driver supports the use of SQL escape sequences, as defined by the JDBC API. Escape sequences are used within an SQL statement to tell the driver that the escaped part of the SQL string should be handled differently. When the JDBC driver processes the escaped part of an SQL string, it translates that part of the string into SQL code that SQL Server understands.
There are five types of escape sequences that the JDBC API requires, and all are supported by the JDBC driver:
  • LIKE wildcard literals
  • Function handling
  • Date and time literals
  • Stored procedure calls
  • Outer joins
The escape sequence syntax used by the JDBC driver is the following:
Function handling 
{fn functionName}
SELECT {fn UCASE(Name)} FROM Employee

0 Response to "SQL Escape Sequences"

Post a Comment

comments