1. Sqlplus Running DB:sqlplus Sys/sys as Sysdba (Sys/sys as "username"/"password")
Or configure the client to run the client's sqlplus after listening
2. (can omit) view current service name:sql> Show parameter service_name
3. Modify Service
Scenario: There is a database encoded as UTF8 on the server, and then the local is ZHS16GBK. I directly with the EXP command to guide down, found that the database is garbled.
Resolution process: Because the code on the server is not easy to change,
The SELECT statement in Oracle can implement a recursive query with the start With...connect by prior clause, which is used in structured queries, and its basic syntax is:Select ... from where Start with Connect by ;: Filter conditions that are used
1.LISTAGG
SELECT deptno,listagg(ename, ', ')WITHIN GROUP( ORDER by ename) as employeesFrom Scott.emp GROUPby Deptno;Summary of Deptno fields, after which multiple ename are separated by ', '
2.NVL/NVL2
--selectemployee_id,last_name,salary*12* (1+NVL
Installing oracle11g on Centos6.4 does not set the character set, using the operating system default character set: we8mswin1252, which modifies the character set to: Al32utf8.
Sql> Select Userenv (' language ') from dual;
Simplified Chinese_china.
1 Find an employee with a commission higher than 60% of the salary.
SELECT * from emp WHERE comm > (SAL * 0.6);
2 Find out the details of all the clerks in department 10 and all the managers and departments in 20.
SELECT * from emp WHERE
to view the recovery after the Table drop table in the Recycle Bin
Select Object_name,original_name,partition_name,type,ts_name,createtime,droptime from RecycleBin;
Sql>flashback table "Bin$b+xkko1rs5k10uko9bfmua==$0" to before drop;
Delete
Oracle Read the comments list, first three by the number of points, and then sorted in reverse order of creation time, required pagination:
The first way:
SELECT * FROM (select b.*, DECODE (rownum, 1, 1, 2, 2, 3, 3, 4) rankFrom (SELECT a.*From
Article from: Also can not find the source address where, in short, thank the author of the sharing
two important processes that are most overlooked in Oracle
There are two processes in the Oracle database that are very small, but they are very
Paging Query format:
SELECT *
from (
select A.*, rownum RN to
(SELECT * FROM table_name) A
WHERE rownum = 21
which
the most inner query select * FROM table_name represents the original query statement without paging。 RowNum = 21 control the
With respect to Oracle's rownum problem, a lot of information said that does not support >,>=,=,between...and, only uses above symbol (,& gt;=,=,between. and will prompt for SQL syntax errors, it is often not to find a record, there will appear to
3 Default users in OracleSYS Change_on_install [as SYSDBA] System Manager Scott Tiger
Data Dictionary
View what system permissions the current user hasSELECT * from User_sys_privs;
View what object permissions the current user hasSELECT * from User_
1. Alternate text
UPDATE ' table_name ' SET ' field_name ' = replace (' Field_name ', ' from_str ', ' to_str ') WHERE ... Description: table_name--the name of the table field_name--the field name from_str--the string to replace the string to_str--
Remote Import Backup command: Imp cpqlzf/cpqlzf@cpql20080505 file=d:\data\20080505xzfw_new.dmp fromuser=sa touser=cpqlzf ignore=y notes: The CPQLZF is the table space name and the login password; cpql20080505 is the database SID name, the backup
Sequence (SEQUENCE)
A sequence is a database object that can be used to generate a unique integer. The main code value is generated automatically by using a sequence.
The value of a sequence is automatically generated by a special Oracle program, so
MySQL Chinese sort has a function such as convert (name using GBK), so I studied the Oracle Chinese sort:Using phonetic sortingSQL>Select*fromorder by Nlssort (name,'nls_ Sort=schinese_pinyin_m'); NAME---------------------------------------- a
1, enter the database Sqlplus/as sysdba2, check the user show parameter Db_name3, start to perform exec dbms_workload_repository after the test. Create_snapshot (); 4, after the completion of the pressure test execution exec
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