Sometimes a column is compared with a series of values. The simplest way is to use subqueries in the where clause. In the WHERE clause, you can use subqueries in two formats.
1. Use the in Operator
2. Use the exist Operator
The first format is
Filter: Use the WHERE clause to filter out rows that do not meet the conditions. SQL> -- Use of the WHERE clause, coupled with filtering conditions, followed by the from table name SQL> -- where syntax select * | {distinct | express | clomn} from
Step 1: migrate the table to the target tablespace
1) use the following statement to list the tablespace statements to be moved in PL/SQL,
Select 'alter table' | table_name | 'move tablespace destination tablespace name; 'from user_all_tables
Set Operators
Union/unionall ------------- Union
The Union operator returns all records after two sets are removed from duplicated elements.
Union all returns all records of two sets, including duplicateSelect * from EMP where deptno = 20 and job
I always think that my Oracle notes are especially spam, but I can't tell you how to write them. I 'd like to thank you for your suggestion! There are two types of SQL functions: single-row function and multi-row function single-row function: the
The grouping function acts on a group of data and returns a value for a group of data. Group function type AVG average count returns the total number of records not empty Max maximum Min SQL> select AVG (salary), max (salary), min (salary), sum
Http://wanwentao.blog.51cto.com/2406488/457604
Roles and permissionsRole permissions are used to grant permissions of a user to a role. Any permission can be granted to a role. You must use the with_admin_option clause to grant the system
Http://wanwentao.blog.51cto.com/2406488/516358
Delete from table name where condition;
Note: deleting a record does not release the occupied data block tablespace in Oracle. It only marks the deleted data blocks as unused.
To delete all records in
The paging SQL statements for Oracle, SQL Server, and MySQL are as follows: ORACLE:
Method 1:
Select * from
(
Select a. *, rownum Rn
From (select * From table_name)
Where rownum )
Where rn> = 21;
Method 2:
Select * from
(
Select a. *, rownum
The following database version is Oracle 9i (9.2.0). When the database is installed, the database system creates a database instance. The installation directory is/Oracle, enter the Database Name and database SID number ora9i.
1. parameter
1. stop all Oracle Services 2. use Oracle universal installer to uninstall oracle3. delete all the primary key Oracle databases under hkey_loacal_machine/software from Oracle with a key value (start à run à Regedit) on the registry. 4. Go to the
I. Although the SGA component can be adjusted to minimize the occurrence of physical I/O, it is inevitable that disk I/O will be generated during some activities. Note that the I/O activity in the memory is logical, and the I/O activity on the disk
In many cases, the local test environment cannot simulate all the performance problems of the customer's production system. It may take only a few minutes to quickly run in the local environment, but it usually takes several hours for the customer
Oracle supports returning the result set after calling the stored procedure through the ref cursor. Using the cursor is much better than returning array variables in terms of memory consumption and time!
Example: Create a package for the
A table connection refers to the association between tables in an SQL statement to retrieve relevant data from one or more tables, in general, the table and table connections can be divided into four types: equal connection, external connection,
Many of my friends asked me what is the main difference between genuine Oracle database products and pirated products. In fact, there is little difference in the product technology itself. You can download a database product from the OTN website and
A bunch of problems after installation. The first step is that the logon fails and the password and user name are unknown.
So I used database configuration and migration tools to create a database demo. At the time of creation, I gave AAA
The Stored Procedure contains three parts: Declaration, execution, and exception.
There are no parameter programs or stored procedures with parameters.
No parameter program syntax
1 create or replace procedure noparpro
2;
3 begin
4;
5
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