Database Reference
In-Depth Information
OUTPUT
Day Month Y e a r
21 6 2 0 0 3
Conversation Function
TO_NUMBER
This function is used to convert 'char' value containing number to number
datatype.
TO_CHAR
This function is used to convert NUMBER datatype to a value of Character
datatype.For example:
SELECT TO_CHAR( 42326,'099,999') From dual;
Output: 042,326
Joining Tables
A join is retrieval of data from more than one table. This section shows you how to merge
rows from multiple tables into a single query. Merging of rows is known as a join. This
section experiments with example SELECT statements containing many different types of
joins. A join is created by the RDBMS as needed, and it persists for the duration of the
query execution. all the tables to be included and how they are related to each other.
Types of Joins
1. Cross-join or Cartesian product: Merges all data selected from both tables into a single
result set.
2. Inner join: Combines rows from both tables using matching column names and column
values. The result set includes only rows that match.
3. Outer join: Selects rows from both tables as with an inner join but including rows from
one or both tables that do not have matching rows in the other table. Missing values are
replaced with null values.
4. Self-join: This joins a table to itself.
5. Equi-joins, anti-joins, and range joins: An equi-join combines table data based on equal-
ity (=), an anti-join matches data based on inequality (!=, <> or NOT), and a range join
compares data using a range of values (<, > or BETWEEN).
Example: Select Student_ID, Name, Semester , MarksObt and Maxmarks from Student,
Student_result table .
Search WWH ::




Custom Search