1. Oracle is case sensitive. 2. trim (
1. Oracle is case sensitive. 2. trim (
1. Oracle is case sensitive.
2. trim ('aa bb cc. ') removes spaces at the beginning and end of the string without removing spaces at the center.
3. Columns cannot be enclosed by single quotation marks ('') when listing aliases. Select empno employee number, ename name... from emp;
4. When creating a function or procedure, note that the _ xxx format cannot be used for parameters. This format will cause errors.
5. Note that the following format cannot be used when creating a package or package:
Begin is not available. You need to remove begin.
Create or replace package handle_student
Is
Begin
Functions...
Procedures...
End;
6. when writing packages and packages, you must pay attention to all the functions in the package. The name of the stored procedure and the parameter names and parameters must be exactly the same as those defined in the package, otherwise, an error occurs.
7. When writing a function or stored procedure, the parameter type cannot be set. For example
Create or replace function query_data (id number (3), name varchar2 (20), address varchar2 (20 ));
This definition is incorrect.
8. When testing a function, if you use the type of a custom parameter, You need to define the parameter range. The format is as follows:
Declare
S_name varchar2 (20); -- This specifies the parameter range. If emp. dname % type is used, it is not required because the definition already contains the range.
S_age number (3 );
S_address varchar2 (30 );
R number;
Begin
S_name: = & s_name;
S_age: = & s_age;
S_address: = & s_address;
R: = handle_student.add_emp (name => s_name, age => s_age, address => s_address );
If r = 1 then
Dbms_output.put_line ('insert successful! ');
Else
Dbms_output.put_line ('insertion failed! ');
End if;
End;
For more information about Oracle, see the Oracle topic page? Tid = 12
,