1.Oracle SQL Developer using 1
Oracle SQL Developer is Oracle's own tools; another third-party tools commonly used Oracle's PL / SQL;
Enter SQL Developer; open a query window; execute a statement;
Query top of the window a row of buttons;
first execute the statement;
the second execution of the script;
the third submission; in some cases submitted to the database operation points, to take effect;
fourth fallback;
the eighth, and last, clear the entry area;
2. Oracle SQL Developer to use 2
Execute scripts in the query window; the result output tab in the window below the script;
Script output window, there are three tool buttons;
the first is the Clear button;
Clear output content after clicking; for next view;
3. Oracle SQL Developer to establish a connection
general user;
system user;
4. oracle sqlplus use substantially
5. Oracle SQL Developer to view the basic operation of the data table
After installation oracle, scott user comes with the example of Table 4;
Click to select a table; select data in the right side of the tab, view the data in a table;
6. Oracle View user table space
select default_tablespace from dba_users where username='scott'
select * from dba_tablespaces;
select username,default_tablespace from user_users;
select default_tablespace from dba_users where username='scott'
select * from dba_tablespaces;
select default_tablespace from dba_users where username='sys'
select username,default_tablespace from user_users;
7. Oracle View user's default table space
8. Oracle stored procedure substantially
9. Change password scott
Change the password is 123456 scott
Sys user login;
the ALTER by the User scott IDENTIFIED 123456;
10. Change the system password
Sys user login;
alter user system identified by 123456;
GRANT SYSDBA TO SYSTEM;
11. SQL Developer position
After installation is complete the contents of the Start menu has 1, 2;
wherein the operator database SQL Developer tool, similar to the Sql Management Studio;
12. Common join query
--自然连接不显示含有NULL的值
SELECT E.ENAME, E.SAL, D.DNAME, E.DEPTNO
FROM EMP E, DEPT D
WHERE E.DEPTNO = D.DEPTNO
ORDER BY ENAME;
--左连接(+)在右面,以左边的表为准,显示左边含有NULL的数据
SELECT E.ENAME, E.SAL, D.DNAME, E.DEPTNO
FROM EMP E, DEPT D
WHERE E.DEPTNO = D.DEPTNO(+)
ORDER BY ENAME;
--右连接(+)在左面,以右边的表为准,显示右边含有NULL的数据
SELECT E.ENAME, E.SAL, D.DNAME, E.DEPTNO
FROM EMP E, DEPT D
WHERE E.DEPTNO(+) = D.DEPTNO
ORDER BY ENAME;
--查询员工的工资等级
SELECT E.ENAME, S.GRADE
FROM EMP E, SALGRADE S
WHERE S.LOSAL <= E.SAL
AND E.SAL <= S.HISAL;
--查询没有员工的部门
SELECT * FROM dept d WHERE NOT EXISTS (SELECT * FROM emp e WHERE e.deptno=d.deptno);
13. basic knowledge
When the Oracle server starts, what kind of file is not necessary: archive log files.
Oracle, when a user wants to execute a SELECT statement, which process you need to get data from the disk: the server process.
Oracle, all database objects owned by a user referred to as: mode.
In Oracle, a function can be used to extract a specific portion of datetime type are: EXTRACT, TO_CHAR.
Oracle database logical structure of the assembly, in descending order: tablespace, segment, area, a data block;
When Oracle create user, table space if not specified, it will be the SYSTEM table space assigned to the user as the default table space.
14. Oracle output statement
sqlserver use print statements output;
Use dbms_output.put_line oracle output statement;