Here is the conversion function
To_char
Select To_char (sysdate, ' yyyy ') from dual;Select To_char (sysdate, ' Fmyyyy-mm-dd ') from dual;Select To_char (sysdate, ' Yyyy-mm-dd ') from dual;Select To_char (sysdate, ' DDD ') from dual;
Dblink's primary role is data access between two databases (1) Global_name View select * from Global_name; (2) View local global_names parameters show parameter Global_ Namesname TYPE VALUE-------------------------------------------------------------
1. Descartes SetSELECT * from EMP, dept;2. Equivalent connectionSelect ename, Job from EMP, deptwhere Emp.deptno=dept.deptno;3. Non-equivalent connectionSelect ename, grade from EMP, SalgradeWhere Sal between Losal and Hisal;Actually, I don't quite
--Discover those SQL runs a lot of Parseselect Sql_text, parse_calls, executions from V$sqlarea order by Parse_calls desc;-- The total parse condition of SYS is select name, value from V$sysstat where name is like ' Parse count% ';--cpu space and
Oracle provides a inverted inverted function reverse, but this function cannot be grouped upside down, this article provides a function that can be grouped upside down, as follows:CREATE OR REPLACE FUNCTION reverse_f (p_str VARCHAR2, P_delimiter
1. What does the index do?Answer: The index is used in the database to improve query efficiency.Add: Too many indexes can significantly reduce the efficiency of DML statements, and the principle of indexing is to build on fields that are frequently
Statistical information Collection1: Create Analysis Table$ cd $ORACLE _home/rdbms/admin$ sqlplus/as SYSDBA > @utlxplan. SQL2: For convenience, you can create a synonym table ( by default only the SYS user can use )sql> create public synonym
After the first chapter of the basic data operation instructions are practiced, some operations of the database are performed.
Create a table class has two columns: numbers and names:
CREATE table Class (numbers number, names char (20));This
CREATE TABLE Products (ProductID Number (TEN) is not NULL,Name VARCHAR2 (255),Description CLOB);Query statement:Select T.productid, t.name from Products twhere Dbms_lob.instr (t.description, ' AAA ', 1, 1) > 0;In Oracle, you can use the InStr
What is consistent reading?Consistent reading refers to a change in the middle that is ignored from the moment of query.Examples ShowFor example, I have two accounts, a, B. A has 1000 pieces and B has 1000 fast. When I query the query speed is
An error encountered during the use of spring+mybatis+oracle.Finally see the online sharing to solve this problem, mark.The main problem is that the configuration of the mybatis is problematic. I'm going to copy it right here.Original link:
The purpose of the SQL Union All directive is to merge the results of the two SQL statements together. The difference between SQL union All and SQL Union is that SQL Union all lists every qualifying data, regardless of whether the database is
The use of the--oracle trunc () function/************** Date ********************/1.select trunc (sysdate) from dual--2011-3-18 today's date is 2011-3-182.select trunc (sysdate, ' mm ') from dual--2011-3-1 returns the first day of the month.3.select
The Oracle Intercept character (SUBSTR), which retrieves the character position (instr), when the then else End statement uses the favoriteCommon functions: Substr and InStr1.SUBSTR (String,start_position,[length]) to substring, return
connecting to Oracle often requires the installation of hundreds of megabytes of Oracle clients, which can be cumbersome. This first describes how to connect to an Oracle database with Plsql by using a thin client that does not require installation.
Oracle has to start two services:1.oracleserver***. (' * ' means that the database name is also known as an "instance" and a service represents a database)2.oracleoradb11g_home1tnslistener. (only start this to connect to the database via JDBC)Oracle
Oracle11g installation and configuration EM
You cannot log on to EM. If you execute emca-config dbcontrol db, you do not know that the default port number is 1522. But google will execute the command in step 2... (My listeners are fine)
1. Open
Oracle Auto-start
By default, Oracle databases in Linux do not start on their own, but many times we need to start the Database on their own, so we need to set the settings as follows:
System Environment: CentOS 6.5
ORACLE version: 10.2
1.
Official Oracle and oracle website
We have encountered such a requirement: to input a String for the method, such as "User ID0, user ID1, user ID2... ", then return a result set based on these IDs as a data table for query by others.SELECT * 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