Oracle 5.0 Reference Manual page 777

Table of Contents

Advertisement

CREATE TABLE `count`(i INT);
CREATE TABLE `count` (i INT);
• With
IGNORE_SPACE
between the function name and the following parenthesis. This provides more flexibility in writing
function calls. For example, either of the following function calls are legal:
SELECT COUNT(*) FROM mytable;
SELECT COUNT (*) FROM mytable;
However, enabling
IGNORE_SPACE
function names as reserved words (see
following the name no longer signifies its use as an identifier. The name can be used in function calls
with or without following whitespace, but causes a syntax error in nonexpression context unless it is
quoted. For example, with
syntax error because the parser interprets
CREATE TABLE count(i INT);
CREATE TABLE count (i INT);
To use the function name in nonexpression context, write it as a quoted identifier:
CREATE TABLE `count`(i INT);
CREATE TABLE `count` (i INT);
To enable the
IGNORE_SPACE
SET sql_mode = 'IGNORE_SPACE';
[536]
is also enabled by certain other composite modes such as
IGNORE_SPACE
include it in their value:
SET sql_mode = 'ANSI';
Check
Section 5.1.7, "Server SQL
[536].
IGNORE_SPACE
To minimize the dependency of SQL code on the
• Avoid creating UDFs or stored functions that have the same name as a built-in function.
• Avoid using function names in nonexpression context. For example, these statements use
(one of the affected function names affected by
whitespace following the name if
CREATE TABLE count(i INT);
CREATE TABLE count (i INT);
If you must use a function name in nonexpression context, write it as a quoted identifier:
CREATE TABLE `count`(i INT);
CREATE TABLE `count` (i INT);
Function Name Resolution
The following rules describe how the server resolves references to function names for function creation
and invocation:
• Built-in functions and user-defined functions
A UDF can be created with the same name as a built-in function but the UDF cannot be invoked
because the parser resolves invocations of the function to refer to the built-in function. For example,
if you create a UDF named ABS, references to
• Built-in functions and stored functions
Function Name Parsing and Resolution
[536]
enabled, the parser loosens the requirement that there be no whitespace
[536]
also has the side effect that the parser treats the affected
Section 9.3, "Reserved
[536]
IGNORE_SPACE
count
[536]
SQL mode, use this statement:
Modes", to see which composite modes enable
IGNORE_SPACE
757
Words"). This means that a space
enabled, both of the following statements fail with a
as a reserved word:
[536]
IGNORE_SPACE
[536]), so they fail with or without
IGNORE_SPACE
[536]
is enabled:
[908]
invoke the built-in function.
ABS()
[540]
that
ANSI
setting, use these guidelines:
count

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents