------------------------------------------------------------------Find out the EMP tableSELECT * from EMP;--Select all information for employees in department 30SELECT * from emp where deptno = 30;--The number of the employee who listed the position
The virtual machine probably needs 60-80g of hard disk space, then the memory starts at 4G1. The first is the installation of operating system Rredhat, in the installation process to pay attention to each step to be optimistic, to choose with a GUI
View Session:SELECT * FROM v$session where username are not nullSelect Username,count (username) from v$session where username isn't null GROUP by usernameCurrent number of connections:Select COUNT (*) from v$processView settings for the number of
--The following are the related tablesSELECT * from V$lock;SELECT * from V$sqlarea;SELECT * from V$session;SELECT * from V$process;SELECT * from V$locked_object;SELECT * from All_objects;SELECT * from v$session_wait;--View the locked tableSelect
Create user
1 CREATE USER by password; //This is the simplest user-created SQL statement. 2 CREATE USER by default Temporary temp; //Increase the SQL statement that specifies the tablespace.
Assigning User Rights
1
Package Test;import java.sql.*; public class Jdbc_test {//ORCL is the database name in the Oracle database, and localhost indicates that the Oracle database connecting to the native//1521 is the port number of the connection private stat IC
First, the basic concept of the databaseIi. Examples of databasesIII. Features of OracleIv. Oracle VersionV. Installation of Oracle ConsiderationsVI. Introduction to SQLVII. SELECT statementsFirst, the basic concept of the databaseDatabase (DATABASE,
sql>startup;Sql> select * from V$version; View version numberSql> SELECT * from dba_profiles s WHERE s.profile= ' DEFAULT ' and resource_name= ' password_life_time '; View password expiration settings for a specified profile (such as default)Sql>
What the database can't avoid is processing the dataScenario: Invoice information, many company employees in the transaction, fill in the invoice information is the same, so the company employees often want to call the unified invoice information,
The use of the--oracle trunc () function/************** Date ********************/1.select trunc (sysdate) from dual--2013-01-06 today's date is 2013-01-062.select trunc (sysdate, ' mm ') from dual--2013-01-01 returns the first day of the
windows+r→ type Sqlplus, enter the installed Oracle Database Super Administrator account password to log in. Show:Success.To create a table space:To create a user and default tablespace:Authorize the user to create a database operation:Code:sql>
1. View All Users:SELECT * from Dba_users;SELECT * from All_users;SELECT * from User_users;2. View user or role system permissions (System permissions that are directly assigned to a user or role):SELECT * from Dba_sys_privs; SELECT * from
Oracle Table Complex Query--sub-queryWhat is a subquery?A subquery is a SELECT statement embedded in another SQL statement, also called a nested query.Single-line subqueryA single-line subquery is a subquery statement that returns only one row of
IamlaosongThe Oracle temporary tablespace is used primarily for querying and storing some buffer data.The primary reason for the temporary table space consumption is the need to sort the intermediate results of the query. the primary role of the
--MAX,MIN,SUM,AVG,COUNT,NVL (,)--Aggregate function--Max: Max value--Max can take the maximum value of the number, or the maximum value of the string (alphabetical order), according to the actual meaning of the scene, it is best to appear in a SQL
Write a simple query statement1. Display all the information of the Department tableSelect * FROM Dept;2. Show department number, department nameSelectdeptno,dname from Dept;3. Displays the connection for the following fields and strings: Employee
After you have installed the Oracle database.It will start the service by default.In order to save the computer resources, we have to adjust it to manual.We have to manually after the Oracle database will have to go to the service inside one to
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