Start Mysql:service mysqld Start
(1) Login to the database as Oracle, command: su–oracle
(2) Enter Sqlplus console, command: Sqlplus/nolog
(3) With the system administrator login, command: Connect/as sysdba
(4) Start database, command: Startup
(5)
Oracle optimization or replace with the in, exists, union several ways, the test is not a problem.
Choose the appropriate statement according to the actual situation. If you have an index, or a full table scan, in and not in also use caution,
explain how to unlock the user in Oracle
Absrtact: Here we will introduce Oracle's methods of unlocking users, including adding users, empowering, modifying passwords, unlocking, and so on in Oracle.
This article introduces Oracle's approach to
The execution code is as follows:
Import java.sql.Connection;Import Java.sql.DriverManager;Import java.sql.PreparedStatement;Import java.sql.SQLException;Import Java.sql.Timestamp;Import java.text.ParseException;Import
Set Operator: union/union All union set, INTERSECT intersection, minus difference set
one, UNION and set, the public part only contains one time
example: to find the EMP table ename containing ' a ' or containing ' M '
sql> SELECT * from emp where
Today, colleagues have encountered a problem because of the rownum problem.
Next to an article:
For Oracle's rownum problem, a lot of information said that do not support >,>=,=,between......and, only use the above symbols (,>=,=,between......and
1 Creating a test table
Create a test table with the SYS user
Sql> CREATE TABLE HR. ST (ID number, time DATE);
Table created.
Sql> INSERT into HR. ST SELECT rownum, CREATED from Dba_objects;
50416 rows created.
Sql> commit;
Commit complete.
2
Trigger
Is the code block that executes automatically when a particular event occurs. Similar to stored procedures, but users cannot call them directly.
Function:1, allow/limit the modification of the table2, automatically generate derived columns,
Understanding of the syntax and performance analysis of ORACLE UPDATE statements:
For convenience, the following simple models are established and some test data is constructed:In the BSS of a business admissibility subsystem,--Customer Information
1, the first need to confirm a few things, the original database username, password, table space name and user role.
2, export the data in the table. Use the Plsql Export table feature.
In fact, the use of oracle/product/10.1.0/db_1/bin/exp. Exe.
Recycle Bin: Show RecycleBin (command line statement) empty Recycle Bin: Purge recyclebin Recycle Bin restore deleted table: Flashback table table_name to before Dorp get system time: Sysdate Average:
Avg
Condition is true: where 1=1 condition is
basic operations for recent Oracle use
1, about the database import and exportRegardless of the import export, the most basic or local need to install the Oracle client, or the most basic import export keywords are not recognized, this is the most
ORACLE Time Usage SummaryOracle month, year, week dataMonth Data SQL codeSELECT * FROM table t where T.create_date >=trunc (sysdate, ' MM ') and T.create_dateCurrent year data SQL codeSELECT * FROM table t where T.create_date >=trunc (sysdate, '
--Start
Oracle supports several collection operators as follows.
Union is used to find the set of two sets, and remove the duplicate value UNION all to find the set of
two sets
INTERSECT to find the intersection of two sets, and remove
C # code
String sql = string. Format (@ "BEGIN UPDATE t SET content= ' 2" WHERE oid= ' 1 '; IF sql%rowcount = 0 THEN INSERT into T (oid,content) VALUES (' 1 ', ' 2 ') ); End IF; End; " ); Sqlhelper.executenonquery ("CONNECT", CommandType.Text, SQL);
Let's take a brief note.
Today, helping colleagues guide the data, from the development environment to the test environment, found that a query is slow. See the execution plan, and found that the full table scan (about 300w records in the table),
Set linesize set long 100000 set wrap on col "Create_user_ddl" for a200 wrapped word define username= "' VINCENT '"--Modify
UserName, query other existing account Select DBMS_METADATA.GET_DDL (' USER ', &username) ' Create_user_ddl ' from dual;
Oracle 10G began to support the use of sga_target parameters for SGA Automatic management, Oracle can automatically adjust the size of the shared pool and data buffer pool, the following is a OS:RH AS4 U7 64bit Environment Oracle version 10.2.0.1
difference between on condition and where condition in Oracle left join
The on condition in the join is the same as the where condition, while the left join is not the same
Sql> CREATE TABLE T1 as select * from Scott.emp;
Table has been
In the query can not avoid the sorting, general write SQL we will add sort fields.
If the sort field is a string, that's a bit of a hassle.
For example, a number field should have been designed as an integer, but designed to be a varcher type.
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