used to terminate a column, expression, or value to any number of decimal places NPM : 2115061014
the function on the input character string and returns the changed value,
The TRUNC function can be used with numbers and dates. This is especially Name : Abdul Rahman Wahid
the word is entered into the function and the function will then execute
2. TRUNC
For example, the MOD of 5 divided by 2 is 1 MOD can be used to determine or change character strings in some way One or more characters or
ROUND can be used with numbers and dates. It is mainly used
used to round numbers to the left of the decimal point
The MOD function finds the remainder after one value is divided by another.
Character manipulation functions are used to extract, convert, format, 4-1 Case and Character Manipulation
1. ROUND
to round a number to a specified number of decimal places, but can also Character Manipulation Function
Section 4
The three number functions are:
then like ROUND, the specified number defaults to zero.
3. MOD
Resume Section 4-6 Database System
4-2 Number Functions
certain. When TRUNC is used, if the number of decimal places is not specified, extracted, calculated, or changed
Class : PSTI C
Machine Translated by Google
No hyphens, text, or other non-numeric data allowed Mata
there is a remainder, the number must be even. For example, if the MOD of x divided by 2 is 0,
However, due to changing business requirements worldwide, the 4 digit year
NUMBER: Used to store numeric data of variable length.
whether a value is odd or even. If you divide the value by 2 and not
•In previous versions, the century component is not displayed by default
numbers, dashes, and special characters 96 or 04
VARCHAR2: Used for variable length character data, including
CHAR: Used for fixed-length text and character data, including
displayed as DD-Mon-YYYY (eg, 23-Oct-2013)
For example, the Oracle database stores the year as 1996 or 2004, not just The DATE data type always stores the year information as a four-digit number
Data Types Described
numbers, dashes, and special characters
internally: two digits for century and two digits for year DATE Data Type
5-1 Conversion Functions
DATE: Used for date and time values. Internally, Oracle
stores the date as a number and, by default, the DATE information 4-3 Date Functions
Section 5
money is stored as a numeric data type
then x must be an even numberis now the default view
Machine Translated by Google
in all matching columns
Null is a value that is unavailable, unassigned, unknown, or not
in CASE comparing two expressions
the same name and select rows from two tables that have the same value You have studied NULLIF, which is logically equivalent to the CASE expression 5-2 NULL Functions
A natural join is based on all the columns in the two tables that have
20 rows with a table with 100 rows, the query will return 2000 rows.
The two conditional expressions are CASE and DECODE
Natural Join
in relational database
possible combination of rows from two tables. If you CROSS JOIN the table with
Conditional Expressiondoesn't mean it's not important.
6-1 Cross Joins and Natural Joins
An SQL join clause joins fields from 2 (or more) tables 5-3 Conditional Expressions
equals anything, not even zero!. But just because it's nothing
Section 6
ANSI/ISO SQL: 1999 SQL CROSS JOIN joins each row in one table to every row in the other table. The result set represents all
the same as any other value, because we don't know what value it has. It doesn't
return null; if not equal, then return the first expression
Cross Join
can be applied. As a result, we can't test to see if it is
NULIF compares two expressions, and if both expressions are equal, then
Machine Translated by Google
hierarchical records. However, where there is a hierarchical relationship between table rows In a natural join, if the table has columns with the same name but
is called an outer join.
natural hierarchies between rows in a table. Relational database does not save 6-2 Join Clauses
When the join returns the unmatched row as well as the matched row, it
Using hierarchical queries, you can retrieve data by relationship matching rows are called inner joins
Self-join is used to join a table with itself as if
Hierarchical Queries
In ANSI-99 SQL, a join of two or more tables that returns only 6-3 Inner versus Outer Joins
Self-Joins
it's two tables
INNER and OUTER Joins
The USING clause specifies the column that should be used for the join.
6-4 Self-Joins and Hierarchical Queries
Hierarchical query is a method of reporting tree branches in order certain.
To avoid this situation, the join clause can be modified with the USING clause.
this is related to the order of the table names in the FROM clause of the SELECT pernyataan statement
single, a process called tree walking allows hierarchies to be built.
The outer join syntax uses the terms "left, full, and right" Names different data types, the join causes an error. For