Two classic examples of Oracle triggershttp://blog.csdn.net/justdo2008/article/details/4137779"Case One"Topic:--Trigger:--Add employee information, serial number as auto number (generated by sequence),--and determine if the wage is less than 0,
(1The code for the lock table query is in the following form:Select Count(*) fromV$locked_object;Select * fromV$locked_object; (2) to see which table is lockedSelectB.owner,b.object_name, A.session_id,a.locked_mode fromV$locked_object A,dba_objects
In general, it is not recommended to assign DBA authority after an Oracle normal user is created. So what permissions are generally assigned?First of all, an Oracle general user, our general requirements are:1. Be able to create the table structure,
Recently intends to look at the Oracle database access, search on the internet, it is said that in addition to ADO and OLE DB, OCI is a common way, but OCI in C-style, in C + +, there are many inconvenient places, so the eyes turned to
Today received a task, need to modify the trigger, because for a long time have not seen about the Oracle trigger, so here through two simple small examples to review the trigger, in case of forgetting.1. Case OneRequirement: Set up trigger, judge
Recently, we often use time functions, write a note here, record your income, and hope to help you.1, for a time such as Sysdate:2015/1/30 14:16:03 how to get only the month and day, at the same time its data type does not change it?The easiest to
In the project, we used the function of INSTR in Oracle, and learned this knowledge again and again carefully.In Oracle, you can use the INSTR function to judge a string to determine whether it contains the specified character.Its syntax is:INSTR
I. Parameter file descriptionPFILE (initialiazation Parameter files) initializes the parameter file, which is a text file that can be viewed directly using a text editor.If the database is using the initialization parameter file Pfile, to
Turn from: http://www.cnblogs.com/252e/archive/2012/09/13/2682817.html Query and delete duplicate records of SQL statement 1, find redundant records in table, Duplicate records are based on a single field (ID) to determine select * from table
Sampling table scan (sample table Scan): Scans the returned table for random sampled data, which needs to include the sample option or the sample block option in the FROM statement.Note: Oracle provides sampling table scanning features from oracle8i2
Only one entry is left for Oracle to delete duplicate dataSQL statement for querying and deleting duplicate records 1. Search for redundant duplicate records in the Table. duplicate records are based on a single field (Id) select * from table where
Two small examples of oracle triggers
I have received a task today and need to modify the trigger. Because I haven't read about the oracle trigger for a long time, I will review the trigger through two simple small examples here for memo.
1. Case
Significance of Oraclecreateindexon (colname, 0)
Today, I saw an index, create index index_name tableanme (colname, 0). It's strange that I have never seen it before. After tests, it was found that it was an item relative to the Union Index and it
Oracle data type-2
5. NUMBERIt is used to store zero, positive, fixed-length negative, and floating point numbers. The NUMBER data type can be set to NUMBER (P, S)
Format to define the precision and range of numbers. Here: p indicates the
Oracle Data Type-1In Oracle databases, each relational table consists of multiple columns. Assign a specific data type to each column to define the data type that will be stored in this column.
1. CHARA maximum of 2000 characters or bytes can be
Use OCCI to access the Oracle database (4)
1. When executing Environment * env = Environment: createEnvironment ();, an exception is thrown, the Code is a ORA-32104, but there is no error message
The reason is that the library used does not
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