SPECIFIC
SPECIFIC in SQL refers to a unique identifier assigned to a particular routine in a database. This keyword is used when there are multiple routines with the same name (overloaded routines), yet having different parameters. SPECIFIC helps differentiate these routines, ensuring precise call and functionality. It constraints unambiguous routine selection when there is an executable call.
Example
Output
Explanation
In the provided SQL script, a new table named ‘Employee’ is created with five columns: ID, Name, Age, Address and Salary. The SPECIFIC
keyword is used to create a unique identification for an SQL-invoked routine. However, in Oracle SQL, there is no SPECIFIC
keyword, thus the script may return an error. The SPECIFIC
keyword is mostly used in SQL procedures and functions.
Note: Oracle SQL does not support the
SPECIFIC
keyword. This example shows the common usage ofSPECIFIC
in SQL and not specific to Oracle.
Example
Output
Explanation
The example demonstrates how to obtain the names of all stored procedures in the ‘dbo’ schema. The SPECIFIC_NAME
column in the INFORMATION_SCHEMA.ROUTINES
view represents the name of the routine (i.e., a stored procedure or function). The ROUTINE_TYPE
is checked to limit the results to stored procedures, and the ROUTINE_SCHEMA
is provided to narrow the scope to the ‘dbo’ schema specifically.