; Scott @ cnmmbo> alter table t modify (Num number ); scott @ cnmmbo> insert into T select 'max _ value', power (10,126)-1 from dual; insert into T select 'max _ value', power (10,126) -1 from dual * error at line 1: ORA-01426: Numeric overflowscott @ cnmmbo> insert into T select 'max _ value', power (10,125) from dual; 10 to the power of 125 can Scott @ cnmmbo> insert into T select 'min _ value', power (10,-130) from dual; Scott @ cnmmbo> select * fr
PL/sql that little thing-->sqlsession operation; SQL []; ORA-01722: Invalid numberIn this case, many methods have been found on the Internet, and there are basically two ways to help us solve this problem:1. Find out the wrong line code to see if the string is converted to a number when the error, if the action beginn
, 197.9333, 197.9333, 197.9333, 197.9333, 0.00012567 );
1 row inserted
SQL> COMMIT;
Commit complete
SQL> SELECT * FROM hjm_num_test;
A
B
C
D
E
F
1
123.3333
123.33
100
123
123
-0.00030
2
197.9333
197.93
200
198
198
0.00013
(Displayed in the pl/
The counting method of querying a field type from pl/SQL is number and the length is greater than 16 bits is displayed as scientific notation pl/SQL query field type from pl/SQL is
Problem Description:Oracle uses PL/SQL developer to export data to CSV format, VARCHAR2 Type field if the value (for example, 3307830000004059) is too long, the CSV file is represented in scientific notation, even if the column is selected, click Data--. > columns, fixed width, column data format select text, and the last one will still be set to 0.Workaround:Oracle uses
, 197.9333, 197.9333, 197.9333, 197.9333, 0.00012567 );
1 row inserted
SQL> COMMIT;
Commit complete
SQL> SELECT * FROM hjm_num_test;
A
B
C
D
E
F
1
123.3333
123.33
100
123
123
-0.00030
2
197.9333
197.93
200
198
198
0.00013
(Displayed in the pl/
ABS (x) function, which is used to return the absolute value of a number.ACOS (x) function returns the arc cosine of X. X ranges from 1 to-1, and the input value ranges from 0 to pie, in radians.The ASIN (x) function returns the arc sine of X. X ranges from 1 to-1. The input value ranges from-PI/2 to PI/2, in radians.The ATAN (x) function returns the arc tangent of X. The input value ranges from-PI/2 to PI/2 in radians.BITAND (x, y) function returns the result of X and Y. X and Y must be non-neg
) function returns the hyperbolic sine of x.
The SQRT (x) function returns the square root of x. x cannot be a negative number.
The TAN (x) function returns the tangent of x. X is an angle in radians.
The TANH (x) function returns the hyperbolic tangent of x.
TRUNC (x [, y]) truncates the value function. The default value of Y is 0, so that X is truncated into an integer. If Y is negative, it is truncated to the right of the decimal point.
WIDTH_BUCKE
the hyperbolic sine of x.
SQRT (x) function that returns the square root of x and x cannot be negative.
The TAN (x) function, which returns the tangent of x. X is the angle expressed in radians.
TANH (x) function that returns the hyperbolic tangent of X.
TRUNC (X[,y]) intercepts the value function, and the Y defaults to 0, so that X is truncated to an integer. If Y is a negative number, intercept to the appropriate position to the left of the decimal
1. First talk about the difference between pl/SQL and SQL * plus. For example, it is easy to understand:
Pl/SQL-> C ++ LanguageSQL * plus-> Microsoft Visual C ++ 6.0 Compiler
Pl/SQL is
Working with Numbers in PL/SQL (use numbers in PL/SQL) This article gives you all the information you need in order to begin working with Numbers in your PL/SQL programs. numbers in PL/
This article gives you all the information you need in order to begin working with numbers in your PL/SQL programs.Numbers in PL/SQL
PL/SQL offers a variety of numeric datatypes to suit different purposes:
code to be parsed, enable profiler, and stop profiler into an SQL statement. The following creates an example to use the bound variable for profiling scott @ USBO> create or replace procedure binds 2 is 3 v_num number; 4 begin 5 for I in 1 .. 100000 loop 6 v_num: = dbms_random.random; 7 insert into t1 values (v_num, v_num); 8 end loop; 9 end; 10/Procedure created. -- call call_profiler.
Working with Dates in PL/SQL (date used in PL/SQL) The previous articles in this introductory PL/SQL series focused on working with strings and numbers in PL/
: = va_planguage ('java', 'c # ', 'c ++ ');FOR I IN 1 .. lang. COUNT LOOPDBMS_OUTPUT.PUT_LINE (lang (I ));End loop;END;
3) how to select the applicable collection type
Generally, the first choice for the set type should be Associative array, because it does not require initialization or EXTEND operations and is the most efficient set type so far. The only drawback is that it can only be used for PL/SQL but
. 0. 0Procedure literals 2. 0. 0. 0
-- The above results show that execute immediate consumes 49s, that is, if the Code time of this line can be reduced, the overall performance will be greatly improved.
3. Use PROFILER to analyze PLSQL code (method 2)
-- This method does not actually change much, but encapsulates the code to be parsed, profiler enabled, and profiler stopped into an SQL statement.-- The following is an example of variable binding.Scot
v_job= ' salesman ' then UPDATE scott.emp SET sal=sal* (1+c_salesman) WHERE empno=empno1; elsif v_job= ' MANAGER ' then UPDATE scott.emp SET sal=sal* (1+c_manager) WHERE empno=empno1; elsif v_job= ' SR.CONT ' then UPDATE scott.emp SET sal=sal* (1+c_sr_cont) WHERE empno=empno1; END IF; --Displays completion information dbms_output. Put_Line (' already for employees ' | | empno1| | ' A successful raise! '); EXCEPTION-handling of PL/
PL-SQL package creation and application, pl-SQL CreationZookeeper
Creating and applying PL-SQL packages
① IntroductionA package is a combination of PL/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.