1. Start Sqlplus2. Please enter your username: Sqlplus/as sysdba3. Enter Password: direct return(Note: For SYS both lock and not lock can be locally certified log into SYSDBA)4. Connect to:Oracle Database 11g Enterprise Edition release
----TRUNCATE TABLE
TRUNCATE table deletes all the data in the table, the structure of the table does not change, and the data cannot be rolled back. ----Sequence
SEQUENCE: Generate a number, automatically generate a primary key, such as
round--rounding according to specified precision
Sql> Select Round (3.1415926,4) from dual;
ROUND (3.1415926,4)
------------------
3.1416
trunc--to intercept a number according to the specified precision
Sql> Select Trunc (3.1415926,4) from
Create a table space
Create tablespace l_l
datafile ' D:luo. DBF '
size 5m
autoextend on next 4m
MaxSize Unlimited;
Create user default table space
Create user Luo identified by 123456 default Tablespace l_l;
Modify user Default space
Alter
Recently, in the forum, we often see someone using the WITH table as statement, generally building a temporary table for testing, after studying the use of this statement I understand the following benefits:
1 without the actual construction of the
About Oracle Update multiple table problemsThere are several ways to achieve this:One is:Update table1Set (field1,field2 ...) =(Select field1,field2 .....)From table2where Table1.field1=table2.field1)where Table1.field1 in (select Field1 from table2)
The Row_number () syntax is as follows:
1, Row_number () over (Order BY column DESC) first returns a sequence number for each record by descending the column columns:
SELECT d.*, Row_ Number () over (order by D.r_opate_num DESC) as INX from
Create or Replace function Get_strarraystrofindex
(
Av_str varchar2,--string to be split
Av_split varchar2,--Separator symbol
Av_index number--take the first few elements
)
return VARCHAR2
Is
LV_STR VARCHAR2 (1024);
Lv_strofindex VARCHAR2 (1024);
Lv_
CREATE TABLE T_dd_for_ccbprotocol
(
ID number () not NULL,
Id_person VARCHAR2 is not NULL,
CONTRACT_NBR VARCHAR2 () not NULL,
Request_date date not NULL,
CDATE Date default sysdate,
EDATE Date default sysdate,
Oracle automatically creates partitions on a daily basis
Due to the accumulation of a table in the database, the table space is not built, but the table is not partitioned, and the deletion time is often caused by the DELETE statement timeout. So
Oracle's timestamp format query is as follows:
SELECT VALUE from nls_session_parameters WHERE PARAMETER = ' Nls_timestamp_format '.
Oracle Query Table Time:
SELECT CREATED from user_objects WHERE object_name= ' tablename ';
New sequence (then
Kai-Stop Oracle Services
Log on to the server where the Oracle service resides [root@localhost ~]# su Oracle[Oracle@localhost ~]$ Sqlplus/nologSql> Connect/as SYSDBAsql> shutdown immediate (Close database instance)Sql> Startup (starting a database
Problem description
When importing data to the Orale database ORA-01658: Unable to create a INITIAL area error for the segment in table Space XXX.
This is due to the amount of data in the data file in the table space that exceeds the initialization
Before looking at Oracle's version information, you know only one way to use the V$versions view, as follows:
Sql> select * from V$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition
Oracle Security includes 2 major categories
Oracle's database system security. Mainly includes the word system level to control user access to the system resources in the database, such as user name, password, user's system operation and the disk
When you need to use these 2 times, first of all, simply:
If you order the monthly product of March 15, the end of the month, then you should charge a 17-day fee, this time should determine whether the order time is greater than the beginning of the
Goldengate has been installed in Oui mode since the 12c version, but in many cases the operating system is not graphical, in which case it can be silently installed, as follows:
1. Upload ogg 12.1.2.1.0 Media
2. Decompression Media
Unzip
The connection operations for database tables are defined in two ways:
Inner connection: Also become an equivalent connection (or become a connection) is the earliest form of connection, the inner join is the deletion of all the ancestors from the
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