Good Afternoon To Everyone
Good Afternoon To Everyone
Projection: what ever typed in select clause i.e, 'column list' or '*' or 'expressions'
that becomes under projection.
*selection:*what type of conditions we are applying on that columns i.e, getting the
records that comes under selection.
For example:
SELECT empno,ename,dno,job from Emp
WHERE job='CLERK';
in the above query the columns "empno,ename,dno,job" those comes under
projection, "where job='clerk'" comes under selection
The SELECT statement is used to select data from a database.
The result is stored in a result table, called the result-set.
A SQL join clause combines records from two or more tables in a relational
database. It creates a set that can be saved as a table or used as it is.
A JOIN is a means for combining fields from two tables (or more) by using
values common to each.
INNER JOIN: Returns all rows when there is at least one match in BOTH
tables
LEFT JOIN: Return all rows from the left table, and the matched rows from
the right table
RIGHT JOIN: Return all rows from the right table, and the matched rows from
the left table
FULL JOIN: Return all rows when there is a match in ONE of the tables
Number : It is used to allows the numbers only, If we want to store the
number data in database. Maximum Size is 38 Digits And also default size is
38.
Syntax : X Number (P, (s)); P is indicate it allows number of digits to store
and S is indicates scale and default value is Zero.
Char : It is used to allow alpha numeric values (Numbers + Characters)
CC dd mm yy hh- mi-ss
21-01-10-15-08-14-20
Timestamp : It is used to store the Date along the fraction of seconds
Long : It Is used to store the information. Sometimes long to maintain the
some manage the information, this respected long datatype captured the
huge information.
Max Size is up to 2 GB we can possible to maintain.
Only one column we can user this datatype for entire table. Sytnax : X Long;
Raw : It is used to store the Images.
Syntax : X Raw;
Longraw : It is used to store the information as well as images
Max size is 2 GB
Syntax X Longraw;
Lob : Lob means if we want to huge information
A => Clob : It is used to store the huge information
Max size is 4 GB
Syntax : X Clob;
B=> Blob : Is used to store images in the form of binary format.
Max size is 4 GB
Syntax : X Blob;
C=> Bfile : It is used to store the files
Max size is 4 GB
Syntax : X Bfile;
Data Definition Language (DDL) is a standard for commands that
define the different structures in a database. DDL statements create, modify,
and remove database objects such as tables, indexes, and users. Common
DDL statements are CREATE, ALTER, and DROP.
A data manipulation language (DML) is a family of syntax elements similar
to a computer programming language used for selecting, inserting, deleting
and updating data in a database. Performing read-only queries of data is
sometimes also considered a component of DML
RESTRICT specifies that table should not be dropped if any dependencies (i.e.
triggers,
stored procedure, primary key, foreign key etc) exist. So if there are
dependencies then
error is generated and the object is not dropped.
CASCADE specifies that even if there dependencies go ahead with the drop. That
means
drop the dependencies first and then the main object also. So if the table has
stored
procedures and keys (primary and secondary keys) they are dropped first and
then the
table is finally dropped.
INSERT: adds new rows to a table.
UPDATE: modifies one or more attributes.
DELETE: deletes one or more rows from a table.