I. What is PL/SQL?
PL/SQL (procedural language/sql) is an extension of Oracle in the standard SQL language.
PL/SQL not only allows the embedding of the language, but also defines variables and constants, allows the use of conditional and circular statements, and allows the use of exceptions to handle various errors, making it more powerful.
Second, why to learn PL/SQL
1. Improve the performance of your application
2. Modular design ideas (pagination process, order process, transfer process). )
3. Reduce network traffic
4. Improve security (SQL will include the table name, and sometimes may have a password, when the transmission will be leaked.) PL/SQL will not be)
Third, why Oracle in PL/SQL developer execution quickly, with C # OracleClient execution is slow
Because PL/SQL is a language specifically designed to access Oracle databases in a variety of environments. Because the language is integrated into the database server, PL/SQL code can quickly and efficiently process the data.
and the C # language is Microsoft's product, it is connected to the Oracle when the "connection pool", so the first time will be slow, but when your Web application does not restart, the future speed will not be slow.
Iv. disadvantages of using PL/SQL
Transplant is not good (Exchange database is not used)
V. PL/SQL Understanding
1), stored procedures, functions, triggers are written in PL/SQL
2), stored procedures, functions, triggers are present in Oracle
3), PL/SQL is a very powerful database process language
4), stored procedures, functions can be called in Java
Vi. write a stored procedure that can add records to a table.
1. Create a simple table
CREATETABLE mytest (
UsernameVARCHAR2 (30),
PwdVARCHAR2 (60L
);
2. The creation process (Replace: Indicates that if there is a insert_proc, it is replaced)
CREATEORreplace procedure Insert_proc is
INSERT into mytest values ( ' Lin Yi-chin '