Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') from dual; --Show Current time2011-12-29 16:24:34Select Trunc (Sysdate, ' year ') from dual; -Interception to year (first day of this year)2011-1-1Select Trunc (sysdate, ' Q ') from dual;
AWR reportThe AWR report is a performance collection and analysis tool provided by Oracle 10g and above that provides a report of the overall system resource usage over a period of time, through which we can understand the entire operation of the
Installation Preparation1 physical memory greater than 1G2 Enough disk space3 explicit host name and corresponding Hosts fileInstall the support package with Yum firstYum-y Install compat-libstdc* elfutils-libelf-devel* libaio-devel numactl-devel
= = <> (not equals)! = (Not equal to): = (Assignment)Between......and (contains boundaries in an interval)--Query wages from 2000 to 5000 of the salary select salary from employees where salary between2000and5000In ()--Query 80,90,70,50, department
You can think of the result set of group by as a table, and then you can take the number from here.e.g.Select A.project_code,a.die_no,e.one_consuming from (select T.project_code, T.die_no, SUM (t.offline_qty) OffqtyFrom Data_plan TWHERE t.begin_date
Storage FunctionsCreate or replace function Name of function (name in type, name out type, ...) return Data Type is result variable data type ;begin return ( result variable );end[Name of function];The difference between stored procedures and
Many times we need to filter the table to update, INSERT, delete and other operations. So if we're going to be a lot of trouble with a single table, here's how the merge into usage will greatly optimize the time and amount of code for our operation
--Create TABLE space permissionsGrant Create tablespace to QJT--Delete Table space permissionsGrant DROP tablespace to QJT--Create TABLE spaceCreate Tablespace QjttestDataFile ' F:\app\QiuShao\oradata\orcl\qjt_1.dbf ' size 10m,'
Programme I: Direct Authorization Act1. Log in with happyy2165, and then authorizeGrant SELECT on HAPPYY2165. STUDENT to Scott2. Log in with Scott and use the following code to access the student tableSELECT * FROM Happyy2165.studentMode two:
Packages are used to logically combine procedures and functions, which consist of package specifications and package bodies.1), we can use the Create Package command for creating packages such as:I, create a package sp_packageII. Declare that the
To view the remaining table space:Select tablespace_name,sum(bytes)/1024x768/1024x768| | ' M ' from Group by Tablespace_nameView Total table space size, usage size, remaining size, usage, remaining
Syntax: Select...start with...connect By...priorThere are two main points1) The prior is placed on the child node side, indicating that the scan tree is scanned from top to bottom as the node specified by start with the root node. May correspond to
The operation of this example is done in the console, and the client is later used.1Sql>--Set line width2Sql>Show Linesize3Linesize 804Sql> Set Linesize 1505Sql>--Set column widths6Sql>Col ename format A87Sql> Col Sal for99998 //Col is the
To create a table space : Create tablespace pdb_videos_pace datafile ' f:/oracle/app/oradata/orcl/pdb_videos_pace.dbf ' size 200M autoextend On next 5M maxsize 3000M; Create a user and assign a default tablespace : create user Jsby identified by
A MySQL Paging1. Scan out the 6000+10 data to remove 10 data volume large book Impact query speedSELECT * from member ORDER by member_id ASC LIMIT 6000,102. Only 10 scanned But the fields used must be in strict order and must be ordered sequentially
1.2 Advanced Content:Two concepts: SCN and CheckpointDefinition of 1.SCN:System change member, which is a very important data structure in the database.The SCN is used to indicate the version submitted by the database at a specific time. When a
CREATE TABLE TableName1(ID CHAR (*) is not NULL,Samplingdate TIMESTAMP (6) NOT NULL,Instantaneousflow number (10,3),Totalflow Number (10),Flowmeterid CHAR (*) is not NULL,Receivetime TIMESTAMP (6),Inserttime TIMESTAMP (6));Partition by range
--Create a tableCreate TableTestwp (ID Number( A), C_date DATE); Select * fromTestwp;--2. Create a sequenceCreatesequence Wp_seq MinValue1MaxValue999999999999999999999999999Start with 141Increment by 1Cache -; --3. Create a stored procedureCreate
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