The use of the--oracle trunc () function/************** Date ********************/1.select trunc (sysdate) from dual--2011-3-18 today's date is 2011-3-182.select trunc (sysdate, ' mm ') from dual--2011-3-1 returns the first day of the month.3.select
/// ///access to ERP fixed assets for data extraction/// /// Company Code /// Application Environment /// language /// account Set code: ' 01 ', ' 02 ', ' the ' /// Fiscal Year /// accounting
Sa--declaring a jobDECLAREjob2014_12_16 Number;BEGINDbms_job. SUBMIT (Job2014_12_16,--This parameter is out type 'syncv5;', To_date (To_char (sysdate+1,'MM/DD') ,'MM/DD'), 'TRUNC (Last_day (sysdate) + 1)');--'
The ultimate goal of SQL optimization is user experience-to get users on page data in the shortest time possible. Therefore, execution time is an important indicator of SQL optimization. In SQL queries, I/O operations account for the most system
After the Oracle database is installed, users such as Scott are locked by default and cannot log on to the database with Scott users.Log in with the user with ALTER USER database permission, and select Sysdba to execute the following command:Unlock
db:11.2.0.3.0View Oracle's redo log switching frequencyTwo SQL, the principle is the same, the second uses the statistical functionTime Unit: MinutesMethod One,SELECT * from V$log a WHERE a.thread# = 1; Set Line 200Select b.sequence#, B.first_time,a.
1.rownum and sortThe rownum in Oracle is the sequence number that is generated when fetching data, so it is important to be aware of the rowmun rows of data that you want to specify for the sorted data.Sql> Select RowNum, id,name from student order
ORACLE10G The database host is already connected to the storage using RDAC, planning to add additional capacity IBMV Series storage (requires the use of Dm-multipath Multi-path software), can multiple multipath software coexist? Does the SD device
Oracle Case When usage introduction1. Case-When expressions have two forms--Simple Case function Case Sex When ' 1 ' Then ' men ' When ' 2 ' then ' women ' Else ' other ' END --case search function CaseWhen sex = ' 1 ' Then ' man ' When sex =
Data export:1 full export of database test, user Name System Password Manager exported to D:\daochu.dmpExp System/[email protected] file=d:\daochu.dmp full=y2 Exporting the system user in the database to the SYS user's tableExp System/[email
Scene: On 20 million data, modify their name plus the suffix "birthday". Normal sql:Update Set = ' Birthday ' where = 1 and not ' Birthday ');Optimize SQL:Declaretype Rid_array is Table ofrowIDIndex bybinary_integer;v_rid rid_array;v_count
A few things to note about Oracle 11.2 Instance access ASM:1. The Oracle user and grid user must have the same group, and the ASM Disk's group is consistent with this group, otherwise the database cannot access ASM disks,Error Ora 15081For example:
OracleBoot auto StartThe database and the Tomcat program need to be started automatically when the server shuts down the rebootOracle Database self-bootingThe Oracle database comes with a self-launching script that can be modified to useVim $ORACLE _
Extended table Space Size statement1. Add a data file to the tablespace:Dba_data_filesALTER tablespace UsersADD datafile '/u02/oracle/rbdb1/users03.dbf ' SIZE 10MAutoextend onNEXT 512KMAXSIZE 250M;2. Adjust the size of the data file:ALTER DATABASE
SQL challenge-how to efficiently generate encoding,
There is a need to generate the next Encoding Based on the input encoding (this encoding value comes from a database table). The encoding rules are as follows (we do not care whether this logic is
Add, delete, modify, and query statements for oracle,
Create a table:
Cteate table name (column 1 type,Column 2 );View table structure desc table nameAdd a field alter table name add (column type );Alter field type alter table name modify (column
ORACLE lag () and lead () FunctionsI. Introduction lag and lead functions are two analysis functions related to offset. The two functions can be used to retrieve the data of the first N rows of the same field in a query (lag) and the next N rows of
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