Oracle Database experience series-Article 1

Source: Internet
Author: User

Oracle Database experience series-Article 1
1) change the date display type of the query results in SQL developer in oracle 11g r2, that is, the setting of the session date type:
Alter session set nls_date_format = 'yyyy-MM-DD HH24: MI: ss ';
Oracle field:
Alter table operator_daily add (op_type number (11 ));

2) The dense_rank () function is a continuous sorting. When there are two second names, it still follows the third name.

3) The rank () function is a skip sorting. When there are two second names, the next is the fourth one (also in each group)

4) View table constraints: Select * from user_constraints where table_name = 'parent ';

Constraint_type: c: check p: primary key r: foreign key u: unique

5) create tablespace mcp datafile 'e: \ oracle \ tablespace \ data. dbf' size 512 m;

6) when the oracle field is varchar2, The substr function is used for conversion, instead of tu_char.

7) when case when exists in the statement, the group by clause must be written into the conditions in case when. Otherwise, the group rules are not met;

8) backup table:
Create table table_name as select * from table_namexxx

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.