Next_day () Gets the date of the next one days of the current date, from the literal meaning easily understood to be the date of the following day to get the current date. For example: Select Next_day (to_date (' 20160330 ', ' YYYYMMDD '), 1) from
--Table Space usage QuerySELECT TBS table space name,SUM (totalm) total size M,SUM (USEDM) has used space m,SUM (REMAINEDM) remaining space m,SUM (USEDM)/sum (Totalm) *100 percent used,SUM (REMAINEDM)/sum (totalm) *100 remaining percentageFrom
First, the archived switch1. Check if the archive is open:sql> archive log list;2. Set the archive pathSql> alter system set log_archive_dest_1= ' LOCATION=D:\ARCH2 ';3. Open Archivesql> shutdown immediate; --Close the databasesql> startup Mount;
Sometimes you need to restart the Oracle database on Linux.Note Start the database first, and then listen on the startup database.Su oraclesqlplus/nologconnect/as sysdbastartup//exit Sqlplusexitlsnrctl start//shut down the database before opening
Reason and method of Oracle user being lockedBe told that the test user is locked when logging in1, with the DBA role of the user login, unlock, first set the specific time format, in order to see the specific timeSql> alter session set
1, reduce the burden of the network: through the MV data from a database distributed to a number of different databases, through multiple database access to alleviate the network burden on a single database. 2, build distribution environment: By
In Oracle, there are three kinds of equals: <>,!=,^=For example:SELECT * FROM test where name<> ' xn '. The returned result is a record where name is not xn and name is not empty. But this is not the same as what we want to get, because our goal is
The simplest block:Begin Dbms_output.put_line ('hello,world'); End;This occurs when the execution results ( execution succeeds, but the string is not displayed ):The workaround is to execute this statement before executing the BLOCK: set
What is the cause of the large amount of empty data that sometimes occurs when you use the left association?This is because the field in the primary table is empty until the primary table is associated with another table, and then the field
1 , in the installation Oracle before installing the following component packages first, enter the following statements directly. Yum Install binutils*-yYum Install compat-lib*-yYum Install gcc*-yYum Install glibc*-yYum Install ksh*-yYum Install
Left paddingSelect Lpad (' ABCDE ', ten, ' 0 ') from dual; = = "00000abcdeSelect Lpad (' ABCDE ', ten, ' X ') from dual;== "XxxxxabcdeThe syntax format is as follows: Lpad (String, Padded_length, [pad_string]) string prepares to be populated, and
SELECT * FROM t where rownum=1 can query out data, while select * from T where rownum=2 can not query out data. In the case of where rownum = 1, the first row passes the test, is output and rownum goesto 2. No other row ever satisfies the predicate
--1. Query for employees with a higher than 7654 salarySELECT * from emp where sal> (select Sal from EMP where empno=7654);---2. Find employee information for minimum wageSELECT * from emp where sal= (select min (sal) from EMP);------------The name
I. Overview of Oracle Table spacesTablespaces are a logical structure in an Oracle database. From the logical level, the table space contains segments, the objects in the database are organized in the form of segments, such as table segments, index
1. There are two forms of case-when expression--simple case function case sex when'1'Then'male' when'2'Then'female'ELSE'other'END--Case search function Casewhen sex='1'Then'male'When sex='2'Then'female'ELSE'other'END2. When a case is used in a
MySQL imports data into Oracle.To build an Oracle table:CREATE TABLE"Gg_user" ("USERID"VARCHAR2(255BYTE) not NULL, "Ispart"VARCHAR2(255BYTE)DEFAULT NULL, "Actualpositionid" Number( One)DEFAULT NULL, "Beginworktime"TIMESTAMP(0)DEFAULT NULL, "BIRTHDAY"
Common group functions:1.ccount () to find out the total number of records.2.max () to find out a set of maximum values3.min () to find a minimum set of values4.avg () to find the average5.sum () summation--1. Statistics of Employees:Select COUNT
Preface: Learning Oracle Recently, so follow this classic book "Oracle Database 9i/10g/11g Programming Art" to learn.Configuring the Environment
How to set up Scott/tiger demo mode correctly
Environments that need to be built and run
How
This week is working overtime, Flash again Thursday, every day overtime time to go fast. The company bought 3 23-inch display, Dell's, can be arbitrarily rotated. First gave me this project group use, do not know calculate a kind of reward ... It's
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