Union and UNION ALL
Select Deptno from empUnionSelect Deptno from dept;Equivalent to the two result sets, union removes the duplicate, union all retains the duplicate2. IntersectSelect Deptno from empIntersectSelect Deptno from dept;This
User Doiido when connecting Oracle, the following error is reported:Ora-28000:the account is lockedView user Status sql> conn/as sysdbaSql> SELECT username,account_status from Dba_users;USERNAME account_status-------------------
"Turn from" http://www.cnblogs.com/netsql/articles/1745978.htmlNote the point:1. If it is opened in a tool such as PL/SQL, directly modify the following code [ Italic bold section] to execute2. Ensure that the path exists, such as
First, the basic operation of the table1. User Management1.1 User of the system in the initial stateUnder System users, execute the following query statement to see all users of the current systemSELECT * from Dba_users;1.2 Create a userSql> create
Prerequisite: You must have DBA authority and have permission to query tablespace usage--View Table space usageSelect UPPER (f.tablespace_name) "Table space name",D.TOT_GROOTTE_MB "Table space size (M)",D.tot_grootte_mb-f.total_bytes "used Space (M)"
Maintenance principle of Big data scale
1. If this table is often crud, the best way is to regularly collect statistics to pass to the Oracle optimizer for improved performance. For example, the Dbms_stats.gather_table_stats command.
Can be
1, the optimization of the sql,sql with the Hotspot table execution time is too long to hold the latch of time. For statements that return fewer results, you should check the use of indexes and partitioning criteria. For example, we query tables
Use the Linesize command to set the number of characters a row of data can hold, with a default number of 80. If the value of the linesize is smaller,Then a row of data in the table will need to be displayed on the screen, and if the value of
1 Dynamic SQL is the concatenation of strings of SQL, using variables instead of specific values, 100,000 statements can be hash Chen a sql_id, can only parse onceFor I in 1..100000LoopExecute immediate' INSERT into T values (: x) ' Using I;End Loop;
Same Databasetwo different users user1 User2user1 there is a table table1create synonym inside the user2create synonym sy1 for user1.table1;once created, direct access is OK.select * from Sy1;data can be taken.but put it in a stored procedure.CREATE
#!/bin/bash# echo "Copy file:"# read-p "Please input the server share your OS installation media and Oracle software:" Server# Mkdir/installyationmedia# SCP [email protected]${server}:/iso/*/installationmedia# if [-e/installationmedia/*.iso]{# echo "
SQL Indexing technology sharing - content Planning
ORACLE Execution Technology
1) What is the implementation plan? 2) How does the execution plan analyze the best path? 3) use PL/SQL to demonstrate how to view the execution plan? 4)
SGA size at Oracle10G startup
The size of the SGA started in Oracle 10g Database is determined by sga_target and sga_max_size. The following three cases are discussed:
Sga_target = sga_max_size
Parameter file value
*.sga_target=599785472
Start
SQL>
Oracle purchase price research, oracle purchase price
If you are an architect, in addition to technical selection, it is more important to choose a cost-effective database. oracle is currently the top database, therefore, it is necessary to
OracleCBO evaluates like data volume
There are two forms of Like Statement, which is evaluated by 5% of the total data volume.
SQL> drop table test purge; SQL> create table test as select * from dba_objects; SQL> exec dbms_stats.gather_table_stats
Oracle edit command
Use the edit command to copy the content in the SQL * plus buffer to an afiedt. buf file, and then start the default editor in the operating system to open this file, and the file content can be edited. In Windows, the default
Oracle Spool commands
Run the spool command to copy the output results of SQL * plus to a specified file or query the results.
Send to the printer and use the spool off command until it is executed.The spool command syntax is as follows:
Spool
Calling the Oracle stored procedure in javaCalling the Oracle stored procedure in java
This article describes how to call the stored procedure of Oracle through java. 1. Write the Stored Procedure
Create or replace procedure sp_pro3 (sp_name VARCHAR2
Auto-incrementing sequence and stored procedure in Oracle
Oracle does not have auto-increment columns. In this case, you must manually write a method or use a sequence or trigger.
Easy to use (personal habits)
1. create sequence salary_seq2.3.
Oracle creates tablespaces and users1. Connect to the database# Su-oracle$ Conn/as sysdba2. Create a tablespaceSQL> create tablespace doiido datafile '/main/oracle/oradata/doiido. dbf' size 1024 M autoextend on next 1024 M maxsize 10240 M extent
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