In Oracle, when describing procedures and functions, the local variable declaration section can be started with the keywords as and is . What is the difference between them?
3 answers
as and is similar to each other, but there is a slight difference:
They are synonymous when creating procedures or packages.
They are different when creating a cursor or table.
For example, it will work:
cursor test_cursor is select * from emp; ... and this is no longer:
cursor test_cursor as select * from emp; Similarly with tables - this code works:
create table test_table as select sysdate from dual And this will already give the error "missing or invalid option":
create table test_table is select sysdate from dual |
There is no difference. The keywords is and as are synonymous, supplied in order to make the code more readable. For example:
FUNCTION f IS ... CREATE VIEW v AS SELECT ... - Specify the source of the response . - Denis
|
Yes, only semantic difference. I usually use as when creating packages
create ... as - Create as ...
and is when defining procedures and functions
procedure ... is - Procedure - is ...
|