Each row (tuple) of a table in an Oracle database has a ROWID, which is the detailed address of the data, and the location of a row's specific data can be quickly located by Rowid,oracle.rowID can be divided into two kinds of physical rowid and
Select Prod.amount,prod.plansum, (Prod.plansum-prod.amount) as borrow,d.enum_value from----result set subtraction(Select T.quo_prod_list_price * t.quo_prod_volume as amount multiply,----column valuesT.quo_prod_plan_cost * T.quo_prod_volume as
--View of database nameSelect name from V$database;650) this.width=650; "src="%5c "alt=" spacer.gif\ "/>--View of instance nameShow parameter instance_name;650) this.width=650; "src="%5c "alt=" spacer.gif\ "/>--Data filesSelect name from V$datafile;-
1. FunctionsCreate or Replace function Get_destroy_no return VARCHAR2 isResult VARCHAR2 (50);BeginSELECT Max (destroy_no) into RESULT from T_oms_device_destroy WHERE substr (destroy_no,0,8) = To_char (sysdate, ' YYYYMMDD ') ;IF (result = "OR result
A set of SQL code for archive modesql> archive log list;#查看是不是归档方式Sql> alter system set LOG_ARCHIVE_START=TRUE Scope=spfile;#启用主动归档Sql> alter system set log_archive_dest= "Location=/oracle/ora9/oradata/arch" scope=spfile;#设置归档路径Sql> alter system set
Test table DataSELECT * FROM test01ID NAMETen CLARKTen KINGTen MILLERADAMSFORDJONESSCOTTSMITHALLENBLAKEJAMESMARTINTURNERWARD1.wmsys.wm_concat usage (at 10g)This function is common, but Oracle's official documentation is not supported and is obsolete
Oracle timer, once set, the server reboot does not affect the execution of the Oracle timer (scheduled daily execution),Begin Sys.dbms_job.submit (Job: job, what = ' check_err; ', next_date = trunc (sysdate)
The update operation meets the criteria, and the insert operation does not conform.Merge intoMyd_nsrdt nusing (Select '9' asMydtmid,'1' asTmtype,'370200123456788' asNSRSBH,"' asNSRMC,'SN' asRegion4 asPf"' asYj'18888888888' asPhone'18888888888'
Exception handlingCreate or replace procedure Prc_get_sex(Stuname Student.name%type)AsStusex Student.sex%type;BeginSelect Sex to Stusex from student where name=stuname;Dbms_output.put_line (' Students ' | | stuname | | ' The sex is: ' | |
the use of the--oracle trunc () function/************** Date TRUNC () function has no accurate ********************/of seconds Select Sysdate from dual--dateSelect Trunc (sysdate) from dualSelect Trunc (sysdate, ' DD ') from dual--today's dateSelect
The previous blog introduced the use of sequences and triggers to implement the self-increment primary key, mainly to avoid the occurrence of the same primary key and error.Now let's introduce another clock to prevent the same method as the primary
Line 1:Create OR REPLACE PROCEDURE is an SQL statement that notifies the Oracle database to create a stored procedure called skeleton, overwriting it if it exists;Line 2:The IS keyword indicates that a PL/SQL body is followed.Line 3:The BEGIN
business background, when executing oracle file, need to authorize to the corresponding file, while we use chown-roracle:oraclegroup xxx, different server Oraclegroup The name is different, how to get it? method: First, we can obtain oraclegroups
Use the Oracledbms_random function to quickly generate multiple test data entries
Database development or management personnel often need to create a large amount of test data, and tens of thousands of data records are required. If one data entry is
ORA-28001: the password has expiredOracle prompt error message ORA-28001: the password has expiredCause: due to the new features of Oracle 11G, the default password expiration limit for Oracle 11G users is 180 days. If the user password is not
[Oracle11g auto-increment primary key]Oracle Auto-incrementing primary keys must be implemented using sequences and triggers. First, we create a table where the primary key is int to implement auto-incrementing.
CreatetableTEST (ID intPRIMARYKEY,
Sysdba cannot log on remotely. What should we do (reprinted) and sysdba log on remotely?Sysdba cannot log on remotely, which is also a common problem.
How can we solve this problem?
When we use sysdba to log on, it is necessary to manage our
Oracle stored procedure execution can input SQL statements and return result sets
1. Create a test table:
Create table AAA (aa NVARCHAR2 (100), bb NVARCHAR2 (100), cc NVARCHAR2 (100), dd NVARCHAR2 (100 )) and import the test data insert into aaa
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