Example 1: Set up a trigger, when the Staff table EMP table is deleted a record, the deleted records are written to the Staff table delete log table. CREATE TABLEEmp_his as SELECT * fromEmpWHERE 1=2; CREATE OR REPLACE TRIGGERTr_del_emp beforeDELETE
Function:1.translateSyntax: TRANSLATE (char, from, to)Usage: Returns the string from which each character appearing in the From is replaced with the corresponding character in to.If the from is longer than the to string, then the characters that are
First, Database modelingIi. Establishment of the tableThird, Database dictionaryIv. DML statementsV. viewsVi. IndexSeven, sequenceVIII. DDL statementsLesson 8 Overview of Data Modeling and Database Design----------------------------------------------
Look at the SQL statement first: Merge into employee E using Emps em on (e.emp_id=em.emp_id)When matched then update set E.emp_name=em.emp_nameWhen isn't matched then insert values (em.emp_id,em.emp_name)1. Update the data in the Emps table to the
Later, the statement is added to the build table.Existing two tables, WESTEMP staff table, with (wtdempid,wtdempname,wtddeptid) column, westdept Department table, there (wtddeptid,wtddeptname,wtddeptaddress) Column. Where westemp.wtddeptid can be
Connection query:A connection query is a query that is based on more than one table or view. When you use a connection query, you should specify a valid query condition, or you might cause a Cartesian product to be generated. If the existing
/** * string Split function. * @param p_str The string to be split * @param delimiter * @return Custom table type Ty_str_split. * Use the method select Column_value from table (Fn_split (', ', ')) * @Author: Xder */create OR REPLACE FUNCTION
often need to be in the database to generate documents, due to the way you prefer the script, so you need to use spool time to format, the following simple collation of the Oracle in the format of some of the things, a total of 18, in fact, the
The principle of database consistency reading for OracleIn an Oracle database, Undo has three main functions:provides a consistent read (consistent read), ROLLBACK TRANSACTION (RollbackTransaction) and instance recovery (Instance
Summarize the Insert usage in Oracle1. Standard Insert-single row insertSyntax: INSERT into table [(Column1,column2,...)] VALUE (value1,value2,...) Example: INSERT into DEP (Dep_id,dep_name) VALUES (1, ' technical Department '); Note: Only one
Prepare to start learning Oracle from scratch.I said 2016 years to write a weekly technical blog. So from now on.Today we have a problem with a weak explosion:A notebook was replaced a few days ago, and the Oracle 11g R2 is installed on the new
Start by first preparing to test if the Oracle database starts normally "is the primary Oracle-related service open"Then create a class that connects to the database with the first thing to remember is what steps are required to connect to the
Two methods for creating Database Link in Oracle are described in detail.
Create A dblink named dblink_name, which is connected from database A to database B. Database B has the IP address 192.168.1.73, port 1521, Instance name oracle, login name
Oracle determines whether a field exists before deleting a field
If you delete a non-existent field in the table in Oracle, such as "alter table test drop column xxx", the following message is displayed:
ORA-00904: "xxx": Invalid identifier
If
Oracle Application-tablespace. User Name. Permission, oracle permission
Although the oracle database application has few codes, it is very practical!
-- 01. tablespaceCreate tablespace tp_hrDatafile'E: \ tp_hr01.dbf' size 10 M,'E: \
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service