: Tname is changedCreate or Replace Trigger TEA_TNAME_UPAfter--event is triggered beforeUpdate of Tname on teacher--action on the Tname column of the teacher table, or directly on the table, remove the row on the row directly on table--Do not write is statement-level, write for each row is row-levelBegin-what is triggered and doneSYS. Dbms_output. Put_Line (' tname is changed ');EndWhen updated: Update teacher Set tname = ' Pure rookie ' where tid=1;
Oracle entry-level knowledge
I.Oracle Basics
1. When should I use the Oracle database?
SQL SERVER claims to be a million-level data (data in one table), but it actually does more than 0.2 million pieces of data
Oracle is used for
the user name currently connected to the database
Supplement: subqueries can be used in insert statements to copy data between tables. It is rarely used in real development. It is similar to copying arrays in Java.
For example, insert into dept1 (id, name) select deptno, dname from dept;
The values clause is unnecessary. The Value List in the subquery should match the field list in the insert clause.
This method can also be used for data backup at the application layer when data replication is
, dname from dept;
The values clause is unnecessary. The Value List in the subquery should match the field list in the insert clause.
This method can also be used for data backup at the application layer when data replication is implemented. However, this backup is generally not reliable.
Backup should be performed at the database level, or DBA can perform automatic data backup for the entire database, incl
character. In actual development, there are not many escape characters.
Escape characters in Oracle can be defined at will, so "" In the example can be replaced with other symbols, such as "K"
Note: A single quotation mark represents the separator mark of a String constant. Two single quotes are used to represent a single quotation mark character in a String constant.
During fuzzy query, there is no need to escape characters. directly use two single
statements, you can use Arithmetic Operators (+,-, *,/) to create expressions for NUMBER-type data.
Example: select empno, ename, sal, sal * 12 from emp; -- query the employee ID name salary and annual salary in emp.
Select empno, ename, sal, sal * 12 + 1000 from emp;
Select empno, ename, SQL, sal * (12 + 1000) from emp; -- you can use parentheses to change the computing sequence.
Join Operator
Overview: "
query conditions for multi-Table connections. Using table aliases can simplify queries. Using table names (Table aliases) prefixes can improve query efficiency.
To connect n tables, at least n-1 join conditions are required. For example, select a. ename, a. deptno, B. dname from emp a, dept B where a. deptno = B. deptno;
Sample: The hr account is also a sample account provided by Oracle. There are many sample tables in it, and the data volume and com
To learn about Oracle, we 'd better first understand the Oracle framework. In this way, we have an overall understanding of Oracle, which has the role of creating a high-level architecture.
1. Physical Structure (composed of control files, data files, redo log files, parameter files, archive files, and password files)
Author: Lu YangTo learn about oracle, we 'd better first understand the Oracle framework. In this way, we have an overall understanding of Oracle, and it has the role of creating a high-level architecture.1. Physical Structure (composed of control files, data files, redo log files, parameter files, archive files, and p
, separated by commasOn Dvf.jobs--which user's tableto C # #wangziqiang; --to whom? At this point, the information on the jobs table will appear again. When a grants b the user's own table the relevant permissions, the default is B can no longer assign a to B permissions to others. By the end, with GRANT option, to set the permissions that B can also assign to someone else's table When a table requires everyone to have permission to this table, we can use public to assign the table permis
1. Opening and closing of CRSClose CRS/etc/init.d/init.crs stopOpen CRS/etc/init.d/init.crs start2. Start and close all cluster servicesShut downCrs_stop-allStartCrs_start-all3, manually start the sequence of cluster servicesNode Application "Nodeapps" –>asm instance –> production Instance –> serviceSrvctl Start Nodeapps-n Node1Srvctl Start Nodeapps-n Node2Srvctl Start Asm-n Node2Srvctl Start Asm-n Node1Log on to the individual node startup database using Sqlplus4, manually shut down the order o
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.