Professional Documents
Culture Documents
Operators 1
Operators 1
Operators 1
Paper V
PGDCS&A
By Rupa Patel
Lecturer, MCA dept.
GHRIIT, Nagpur.
UNIT III -SQL
CODD’s Rules, oracle database objects, Sub Languages of SQL,
data Types, Operators.
DDL Statements : Creating tables, Deriving Table from Existing
table, Altering, Dropping Tables, Integrity
Constraints,Specifying Names for the constraints,Viewing
Integrity constraints,adding & Dropping Constraints.
DML Statements : SELECT statement,Insert,update,Delete,&
Synonyms.
Functions : Arithmetic,Date,Character,Cobnversions.Single
row,Aggregate,Decode,Joins,Set operators & Sub queries.
DCL & TCL Statements : Grant,Revoke,Commit,Rollback &
Savepoints.
Single Character
SELECT * FROM wildcard WHERE test LIKE '23_5';
Multiple Characters :
';
SELECT * FROM wildcard WHERE test LIKE '2%5
Complex Statement
SELECT * FROM wildcard WHERE test LIKE '%a%a %';
DECLARE
x VARCHAR2(1) := 'A';
BEGIN
dbms_output.put_line(x);
x := 'B';
dbms_output.put_line(x);
END;
/
Addition
SELECT <date_value> + <numeric_value>
Subtraction
SELECT <date_value> - <date_value>
Once you have defined a new operator, you can use it in SQL
statements like any other built-in operator. For example, you
can use user-defined operators in the select list of a SELECT
statement, the condition of a WHERE clause, or in ORDER
BY clauses and GROUP BY clauses. However, you must have
EXECUTE privilege on the operator to do so, because it is a
user-defined object.