1 / 6

Oracle & SQL

Oracle & SQL. Oracle Data Types. Character Data Types: Char(2) Varchar (20) Clob: large character string as long as 4GB Bolb and bfile: large amount of binary file Numeric Data Types: Number: used to store real numbers

paytah
Download Presentation

Oracle & SQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oracle & SQL

  2. Oracle Data Types • Character Data Types: • Char(2) • Varchar (20) • Clob: large character string as long as 4GB • Bolb and bfile: large amount of binary file • Numeric Data Types: • Number: used to store real numbers • Binary float & binary double: to store data in a floating –point format • Date and Time Data Types: • Date: stores date & time • Timestamp: stores time values that are precise to fractional seconds • Conversion functions: • TO_CHAR: floating number to a string • TO_NUMBER: floating number or string to a number • TO_DATE: character data to a DATE data type • TO_TIMESTAMP:

  3. SQL Statements • Data Manipulation: • SELECT • INSERT • DELETE • UPDATE • Data Definition: • CREATE TABLE • DROP TABLE • ALTER TABLE • CREATE VIEW • DROP VIEW • CREATE INDEX • DROP INDEX • CREATE SCHEME • DROP SCHEME • CREATE DOMAIN • DROP DOMAIN • Access Control: • GRANT • REVOKE

  4. Transaction Control: • COMMIT: Ends the current transaction • ROLLBACK: Aborts the current transaction • SET TRANSACTION: Define the data access char. • Programmatic Control: • DECLARE • EXPLAIN • OPEN • FETCH • CLOSE • PREPARE • EXECUTE • DESCRIBE

  5. Sql Operators • Comparison operator: • Between: tests whether a value is between a pair of value • IN: test whether a value is in a list of values • LIKE: Tests whether a value follows a certain pattern • Logical Operator: • AND, OR, NOT, GE, LE • The set Operator: • UNION: combines the result of more than one select statement after removing any duplicate rows • NUION ALL: • INTERSECTION: • MINUS: returns the rows returned by the first query that aren’t in the second query’s result.

  6. SQL Functions • Single-Row Functions: • CONCAT: puts together two or more character strings into one string • LENGTH: length of character string • LOWER: uppercase letter to lower case • SUBSTR: part of string • INSTR: number indicating where in a string a certain string value starts. • REPLACE: • Aggregate Functions: • MIN • MAX • AVG • SUM • COUNT: total number of columns • COUNT(*) : number of rows in a table • Number & Date Functions: • ROUND • TRUNC • TO_DATE

More Related