Sql> CREATE TABLE Test (ID number,name varchar2 (Ten), Gender VARCHAR2 (5)); sql> INSERT INTO test values (1, ' Song Chunli ', ' Male '); 1 rows have been created. sql> INSERT INTO test values (2, ' ye min paid ', ' Male '); 1 rows have been created.
Original:Http://tech.it168.com/oldarticle/2006-04-02/200604021512359.shtmlHttp://www.cnblogs.com/m-cnblogs/archive/2012/02/23/2364906.html1. Create a test stored procedure:sql> Create or Replace procedure Proc_test (P1 in varchar2,p2 off varchar2)
1. There are four fields in the table: Personnel number, start time, end time, type, data ID, need to implement the following requirementsA. When the type is-1, the record is discardedB. When the type is-1, and the previous line end time is null,
Truncate DDL statements, delete data in the table faster than delete, and all self-increment fields start counting again, delete data-preserving table structure, delete data does not enter rollback segment, cannot be recovered. Example: Truncate
1. When a parent-child relationship exists between rows in a table, the parent-child relationship between rows and rows can be queried by using Connect by querySelectLpad ('-',( Level-1),'-')||Empno asTempno, Ename,mgr, Level, Decode ( Level,1,1)
A long time without SQL statements, seemingly into the new company, and back to the three years ago in the SQL era, write a lump of SQL well, also when the return of the past knowledge.The following is a statistic of February dataSelect T.telno as
1.rownum:rownum is a pseudo-column that needs to be rownum when the data is taken out, so a nested query is required for paging lookups.SelectSal,ename from (SelectRowNum asRn,sal,ename from (SelectSal,ename fromEmpwhereSal is not NULL Order
Data processing in the database, it is often necessary to get top N for a certain class, which involves grouping group by and sorting order by, then according to RowNum to obtain the first few data, the Oracle Database Row_number () over function
--oracle Database Creation Table spaceCreate Tablespace New_taspace--Table space nameDataFile ' D:\NEWTABLESPACE. DBF '-The data file and location associated with the TablespaceSize 200M--File Initial sizeAutoextend on next 20MB MAXSIZE 400MB;
After installing Oracle, we can go to the service and see several more Oracle services,650) this.width=650; "id=" aimg_ifb4b "class=" Zoom "width=" "height=" "src=" http://dl2.iteye.com/upload/ Attachment/0105/7934/4858e4ce-5cb4-340b-b040-806be8907e4
This SQL paging is simple, but is often used to query large amounts of data.SELECT * FROM (select A.*,rownum RN from (SELECT * from table_xx) A WHERE ROWNUM =11 This SQL is efficient because in optimization mode, Oracle can push the outer query
--Stored Procedure syntaxCreate or Replace procedure name (Parameter 1 in/out type (cannot give length),Parameter 2 in/out type (cannot give length),Parameter 3 in/out type (cannot give length)) isParameter 4 type (can give length);Parameter 5 type (
Grammar:Select * from with column = ? Connect by [[Prior] T.parentidFor example: Menu table, table structure is as follows The data are as follows: First, from the top down1. Query all sub-menus for a specified IDSelect * from with=1 by= T. "
Oracle BASICS (4): Single Table query1. Basic Query(1) Basic Statement 1. SyntaxSelect [distinct] * | {Column name...} from table name [where {condition}] 2. Note 1) distinct: whether to remove duplicate data when displaying resultsIndicates that
Guess: the cause of SQLText & quot; ** SQLTextNotAvailable ** & quot; In the Oracleash report
Guess: Why "** SQL Text Not Available **" appears in SQL Text in the Oracle ash report
The HVR data synchronization software is being tested today. Due to
Oracle physical storage structureOracle physical storage structure
The database is actually composed of a pile of physical files, mainly including four:1. control files)2. Data files (Date files)3. redolog)1. Control File
The control file is the
Application of Oracle Timer
Oracle timer. Once set, the restart of the server will not affect the execution of the Oracle timer (scheduled to be executed every day ),
Begin sys. dbms_job.submit (job =>: job, what => 'check _ err; ', next_date =>
Oracle SQL Performance Optimization and oraclesql Performance Optimization
(1)Select the most efficient table name sequence (valid only in the rule-based Optimizer ):The ORACLE parser processes the table names in the FROM clause in the order FROM
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