Professional Documents
Culture Documents
This account can perform all administrative functions. All base (underlying) tables and views for the
database data dictionary are stored in the SYS schema. These base tables and views are critical for the
operation of Oracle Database. To maintain the integrity of the data dictionary, tables in the SYS schema
are manipulated only by the database. They should never be modified by any user or database
administrator. You must not create any tables in the SYS schema.
The SYS user is granted the SYSDBA privilege, which enables a user to perform high-level
administrative tasks such as backup and recovery.
SYSadmin:
sys admin can perform any operation on server.
SQL*Plus is a command-line tool that provides access to the Oracle RDBMS. SQL*Plus enables you to:
•Enter SQL*Plus commands to configure the SQL*Plus environment
•Startup and shutdown an Oracle database
•Connect to an Oracle database
•Enter and execute SQL commands and PL/SQL blocks
•Format and print query results
The port numbers are divided into three ranges: the well-known ports, the registered ports, and
the dynamic or private ports.
3) what is listner?
Oracle Net Listener is a separate process that runs on the database server computer. It
receives incoming client connection requests and manages the traffic of these requests to
the database server
The Listener Control utility enables you to administer listeners. You can use its commands
to perform basic management functions on one or more listeners. Additionally, you can
view and change parameter settings. The basic syntax of Listener Control utility
commands is as follows: lsnrctl command [listener_name]
What is alias?
alias command instructs the shell to replace one string with another string while executing the
commands.
When we often have to use a single big command multiple times, in those cases, we create
something called as alias for that command. Alias is like a shortcut command which will have
same functionality as if we are writing the whole command.
Syntax:
alias [-p] [name[=value] ... ]
Creating an alias :
Syntax:
alias name="value"
In C shell:
The default editor that comes with the UNIX operating system is called vi (visual editor). Using
vi editor, we can edit an existing file or create a new file from scratch. we can also use this
editor to just read a text file.
Syntax:
vi filename
Input:
Output:
Modes of Operation in vi editor There are three modes of operation in vi:
•(INNER) JOIN: Returns records that have matching values in both tables
•LEFT (OUTER) JOIN: Returns all records from the left table, and the matched
records from the right table
•RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched
records from the left table
•FULL (OUTER) JOIN: Returns all records when there is a match in either left or
right table
INNER JOIN
This JOIN returns all records from multiple tables that satisfy the specified join condition. It is the
simple and most popular form of join and assumes as a default join. If we omit the INNER
keyword with the JOIN query, we will get the same output.
The following visual representation explains how INNER JOIN returns the matching records
from table1 and table2:
1. SELECT columns
2. FROM table1
3. INNER JOIN table2 ON condition1
4. INNER JOIN table3 ON condition2
Table: Student
Table: Fee
1. SELECT Student.admission_no, Student.first_name, Student.last_name, Fee.course, Fee.amount_p
aid
2. FROM Student
3. INNER JOIN Fee
4. ON Student.admission_no = Fee.admission_no;
1. SELECT column_lists
2. FROM table1
3. LEFT [OUTER] JOIN table2
4. ON table1.column = table2.column;
Example
We can demonstrate the LEFT OUTER JOIN using the following command:
1. SELECT Student.admission_no, Student.first_name, Student.last_name, Fee.course, Fee.amount_p
aid
2. FROM Student
3. LEFT OUTER JOIN Fee
4. ON Student.admission_no = Fee.admission_no;
This command gives the below result:
RIGHT OUTER JOIN
The RIGHT OUTER JOIN retrieves all the records from the right-hand table and matched
rows from the left-hand table. It will return NULL when no matching record is found in the left-
hand table. Since OUTER is an optional keyword, it is also known as RIGHT JOIN.
The below visual representation illustrates the RIGHT OUTER JOIN:
1. SELECT column_lists
2. FROM table1
3. RIGHT [OUTER] JOIN table2
4. ON table1.column = table2.column;
Example
The following example explains how to use the RIGHT OUTER JOIN to get records from both
tables:
1. SELECT Student.admission_no, Student.first_name, Student.last_name, Fee.course, Fee.amount_p
aid
2. FROM Student
3. RIGHT OUTER JOIN Fee
4. ON Student.admission_no = Fee.admission_no;
This command gives the below result:
In this output, we can see that no column has NULL values because all rows in the Fee table are
available in the Student table based on the specified condition.
1. SELECT column_lists
2. FROM table1
3. FULL [OUTER] JOIN table2
4. ON table1.column = table2.column;
Example
The following example explains how to use the FULL OUTER JOIN to get records from both
tables:
1. SELECT Student.admission_no, Student.first_name, Student.last_name, Fee.course, Fee.amount_p
aid
2. FROM Student
3. FULL OUTER JOIN Fee
4. ON Student.admission_no = Fee.admission_no;