$.each () loop out, you should return with returnBreak and continue cannot be used within each code block, and there are other ways to implement the function of break and continue:Break----with return false;Continue--with return true;If you want to
While loopwhile (condition) {code to execute if condition is set}* The general condition variable needs to increment, otherwise it will enter the dead loop (infinite loop), the browser crashes or even the computer freezes.For example, a row-by-line
ForElseThe For loop executes the Else statement if it ends normally.We write a for...else-type statement as follows:#!/usr/local/python3/bin/pythonfor i in range(10): print(i)else: print(‘main end‘)After the run we will find that, in this case,
Loops Loop statement:1: GrammarLOOPThe statement to execute;Exit when /* condition satisfies, exits loop statement */END LOOP;Where: The EXIT when clause is required, otherwise the loop cannot be stopped.2: ExampleDeclareint number (2): =
Loop ExitFor loop:ForElseThe For loop will execute the ELSE statement if it ends normally.Script 1:#!/usr/bin/env python for I in Xrange (10):Print IElse:Print "Main End"Results:[email protected] 20171227]# python exit.py0123456789Main end[Email
The flow control statements in the PL/SQL program draw on the process control ideas of many high-level languages, but have their own characteristics.
Condition control
The following example describes the use of conditional control statements.
1.
The syntax of plsql is different from that of tsql. For more information, see.
The syntax of plsql is different from that of tsql. For more information, see.
Insert into testtable (recordnumber, currentdate) values (I, sysdate );
Print '';
Select @
Oracle Database PLSQL learning summary, oracleplsqlPLSQL Introduction
PLSQL is an extension of SQL99 in Oracle., Basically every database will expand SQL. Oracle's extension to SQL is called PLSQL...
What is SQL99?
(1)Is the rule for operating all
The execution and exception parts of PL/SQL in OracleI. The executive section of PL/SQL.
An assignment statement.
Assignment statements are divided into two types, one defining a variable and then receiving the user's IO assignment,
Usually we obtain cursor data in the form of fetch some_cursor into var1 and var2. When there are not many records in the cursor, It is not tight. However, since Oracle 8i, Oracle has provided fetch bulk collect to fetch data in the cursor in
Insert into testtable (recordnumber, currentdate) values (I, sysdate );
Print '';
Select @ I = @ I + 1;
End;
After comparison, we can see that it is different.
The command structure in plsql isDelacreDefine statement segmentsBeginExecution
Oracle Database-practical operations (3) PL/SQL
Oracle ---- PL/SQL
PL/SQL is a programming Language that combines Procedural Language and Structured Query Language (SQL ).
PL/SQL is unique to Oracle and is an extension of SQL. Different database
Insert into testtable (recordnumber, currentdate) values (I, sysdate );Print '';Select @ I = @ I + 1;End;After comparison, we can see that it is different.The command structure in plsql isDelacreDefine statement segmentsBeginExecution statement
Insert into TestTable (recordnumber,currentdate) values (i,sysdate);
print ';
Select @i=@i+1;
End
You can tell by comparison that it's different.
Plsql inside the structure of the command
Delacre
Define a statement segment
Begin
Execute a
Project life cycle:Waterfall modelOnce you get a project, first: Analyze the SQL statements that need to be used;Second: The analysis of the variables needed to define the initial value of how much, how to get the final value;Case one:Count the
I just typed an example and wrote "Next" in the fornext loop structure as "exit". Later I thought about it and it actually had a similar meaning, so I found the use of exit so that I won't confuse it again next time.
Exit the do... loop, for... Next,
Exception:The exception is a feature that is provided by the programming language to enhance the robustness and fault tolerance of the program.Exceptions are divided into:System exceptionsCustom exceptionsSystem exceptions are divided
PLSQl basic structure PLSQL data type numeric type: NUMBER (P, S), PLS_INTEGER, BINARY_INTEGER character type: CHAR, NCHAR, VARCHAR2, NVARCHAR2, long date type: DATE boolean type: BOOLEAN defines the data type: typetype data type name is data type;
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.