This example implements the connection string and removes the duplicate item.
An aggregate function is actually an object:[SQL] View Plain Copy create or replace type distinct_concat_type as object ( --Object variable cat_string varchar2 (+
Recycle Bin: Show RecycleBin (command line statement) empty Recycle Bin: Purge recyclebin Recycle Bin restore deleted table: Flashback table table_name to before Dorp get system time: Sysdate Average:
Avg
Condition is true: where 1=1 condition is
--Start
Oracle supports several collection operators as follows.
Union is used to find the set of two sets, and remove the duplicate value UNION all to find the set of
two sets
INTERSECT to find the intersection of two sets, and remove
C # code
String sql = string. Format (@ "BEGIN UPDATE t SET content= ' 2" WHERE oid= ' 1 '; IF sql%rowcount = 0 THEN INSERT into T (oid,content) VALUES (' 1 ', ' 2 ') ); End IF; End; " ); Sqlhelper.executenonquery ("CONNECT", CommandType.Text, SQL);
Set linesize set long 100000 set wrap on col "Create_user_ddl" for a200 wrapped word define username= "' VINCENT '"--Modify
UserName, query other existing account Select DBMS_METADATA.GET_DDL (' USER ', &username) ' Create_user_ddl ' from dual;
difference between on condition and where condition in Oracle left join
The on condition in the join is the same as the where condition, while the left join is not the same
Sql> CREATE TABLE T1 as select * from Scott.emp;
Table has been
For example, the following command is slow to executeThe following is a code fragment:Select A.empno from emp A where a.empno does not(select Empno from Emp1 where job=′sale′);If you are using an outer join, rewrite the command as follows:The
Trunc (sysdate-to_date (' 2003-10-25 ', ' yyyy-mm-dd '))
Select Trunc (to_date (string1, ' yyyy-mm-dd ')-to_date (string2, ' Yyyy-mm-dd ')) from dual;
The Sybase function DateDiff () is used in SQL to replace the function with an error executing in
Manually start an ORACLE database instance assume that the instance name ORCL first export the environment variable in the configuration file or set ORACLE_SID=ORCL sqlplus Sys/password as Sysdba sql>startup; The startup command reads the
In operatorThe advantage of using in-write SQL is that it is easier to write and understand, which is more suited to the style of modern software development. However, in SQL performance is always lower, the steps that are performed from Oracle
This morning, the user called to say that the system has a problem with the sorting, look carefully, the problem seems to be out of rownum this function.
The RowNum function in Oracle is to assign an increment to the query result in order, so many
Oracle exists problems are frequently encountered when learning Oracle, and this will address the Oracle exists solution. Oracle uses a complex, self-balanced b-tree structure. In general, querying data through an index is faster than full table
Connect Resource Permission
Grant Connect,resource to user;
Permissions that the user includes after executing the above SQL statement:
Connect Role:--is the typical right to give end users, the most basic
Alter session--modifying sessions
Create
RowNum is a pseudo column that Oracle has provided from 8, numbering the results of SQL, always starting at 1, with the common use of paging output.
Like what:
SELECT * from table_temp t WHERE rownum
SELECT * FROM (select A.*, rownum rn
Original URL: http://blog.sina.com.cn/s/blog_7e4ac8b50100vcwv.html
Parsing and execution order of the SQL condition field (Where part) [Right--> left]Experiment one: It is proved that the parsing of SQL is from right to leftThe following experiment
Parallel DDL
Sql> CREATE index idx_t3 on T1 (object_name,object_id) parallel;The index has been created.Sql> Select Index_name, degree from user_indexes where index_name= ' idx_t3 ';No rows selectedSql> Select Index_name, degree from user_indexes
has been entangled in the stored procedure is and as recently on the Internet to check the huge amount of information, summed up as follows:
There is no difference in stored procedures (PROCEDURE) and functions (function);
Only as cannot be used in
Method One: You can configure it by opening the Tnsnames.ora in the Oracle installation directory as follows:
Specific path such as: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Tnsnames.ora Network Configuration File:f:\
Recently, the company's server seems to have a problem, often motionless will appear problems, Plsql will also frequent the crash log not up, think of the database backup, just in case.
The simple code is as follows:
Create process
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