SlideShare a Scribd company logo
Introduction to Oracle Structured Query Language
BN1037 – Demo PPT
Demo Oracle SQL
http://www.conlinetraining.com/courses/sql-online-training/
Oracle SQL Course Details
• Basic SQL Statement
• Restricting and Sorting Data
• Single Row Functions
• Displaying Data from Multiple Tables
• Aggregating Data by Using Group Functions
• Writing Sub queries
• Sqlplus, isqlplus
• Manipulating Data
• Managing Tables, Constraints
• Views
• Other Database Objects
• Controlling User Access
• Using Set Operators
• Oracle Extensions to DML and DDL Statements
http://www.conlinetraining.com/courses/sql-online-training/
Oracle Constraints types
Constraints: -- Constraints apply specific rules to data, ensuring the data conforms
to the requirements defined. There are a number of different kinds of constraints.
There are two ways to apply constraint into Database.
1)Column level Constraint.
2)Table Level Constraint.
http://www.conlinetraining.com/courses/sql-online-training/
Types Of Constraints
• Not NULL
• Primary key
• Unique
• Foreign Key
• Check
• Let's look at each of these in a little more detail.
http://www.conlinetraining.com/courses/sql-online-training/
NOT NULL Constraints
• NOT NULL constraints are in-line constraints that indicate that a column can not contain NULL
values. For example, the PERSON_ID column is defined as NOT NULL in that example.
• If you need to add a NOT NULL constraint to a table after the fact, simply use the alter table
command as in this example:
• Syntax:-
• create table
customer
(status char(3) not null,
val number not null);
• Alter Table Table Name Modify( person_id NOT NULL);
• When copying tables, beware that NULL values many not copy properly.
http://www.conlinetraining.com/courses/sql-online-training/
Primary Key Constraints
• Primary key constraints define a column or series of columns that uniquely identify a given
row in a table. Defining a primary key on a table is optional and you can only define a single
primary key on a table. A primary key constraint can consist of one or many columns (up to 32
). Any column that is defined as a primary key column is automatically set with a NOT NULL
status.
• Syntax:-create table
customer
(status_id Number CONSTRAINT CONSTRAINT _NAME
);
• If you need to primary key constraint to a table after the fact, simply use the alter table
command.
• ALTER TABLE customer ADD CONSTRAINT pk_my_status
PRIMARY KEY (status_id);
http://www.conlinetraining.com/courses/sql-online-training/
Unique Constraints
• Unique constraints are like alternative primary key constraints.
• A unique constraint defines a column, or series of columns, that must be unique in value.
• You can have a number of unique constraints defined and the columns can have NULL values
in them, unlike a column that belongs to a primary key constraint.
• If you need to add unique key constraints to a table after the fact, simply use the alter table
command.
• ALTER TABLE
my_status
ADD CONSTRAINT
uk_my_status
UNIQUE
(status_id,
person_id);
http://www.conlinetraining.com/courses/sql-online-training/
Foreign Key Constraints
• A foreign key constraint is used to enforce a relationship between two tables. As an example, take the case of
two tables, ITEM and PART. These tables have a relationship (an item can have none, one or many parts).
Foreign key constraints help to enforce that relationship
• Well, foreign key constraints help to enforce the types of relationships between tables we have just
demonstrated. In this example we will create the ITEM and PART table. In the process of doing so, we will
create a foreign key relationship between the two:
– CREATE TABLE part
– ( Part_no NUMBER PRIMARY KEY,
– Part_desc VARCHAR2(200) NOT NULL );
http://www.conlinetraining.com/courses/sql-online-training/
Create Table
• CREATE TABLE item (Item_no NUMBER,Part_no NUMBER,Item_desc varchar2(200) NOT
NULL, CONSTRAINT fk_item_part FOREIGN KEY (part_no) REFERENCES PART (part_no), CON
STRAINT pk_item PRIMARY KEY (item_no, part_no) );
• In this example, what we are really interested in is the creation of the ITEM table. First, note that
we defined the primary key as an out of line primary key. This is because it is a composite
primary key and composite primary keys have to be defined out of line.
• Now, we are interested in the foreign key definition. You must define foreign key constraints as
out of line constraints, as we have done in our example. Here is a snippet of the command that
we used:
• CONSTRAINT fk_item_part FOREIGN KEY (part_no) REFERENCES part (part_no);
http://www.conlinetraining.com/courses/sql-online-training/
Alter Table
• If you need to add foreign key constraints to a table after the fact, simply
use the alter table command as seen here:
• ALTER TABLE my_status ADD CONSTRAINT fk_my_status
FOREIGN KEY (part_no) REFERENCES part (part_no);
http://www.conlinetraining.com/courses/sql-online-training/
Check Constraints
• Check constraints validate that values in a given column meet a specific criteria.
• For example, you could create a check constraint on a varchar2 column so it
only can contain the values T or F as in this example:
• Create table my_status
( status_id NUMBER PRIMARY KEY,
person_id NUMBER NOT NULL,
active_record VARCHAR2(1) NOT NULL
CHECK (UPPER(active_record)='T' or
UPPER(active_record)='F'),
person_ssn VARCHAR2(20) CONSTRAINT un_person_ssn UNIQUE
);
http://www.conlinetraining.com/courses/sql-online-training/
Questions ???
http://www.conlinetraining.com/courses/sql-online-training/
Email us : info@conlineTraining.com
Visit : www.conlinetraining.com

More Related Content

What's hot

Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In SqlAnurag
 
Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd session
Medhat Dawoud
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
SomeshwarMoholkar
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
1keydata
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
SQL select clause
SQL select clauseSQL select clause
SQL select clause
arpit bhadoriya
 
MySQL Pro
MySQL ProMySQL Pro
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commandsBelle Wx
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
Edureka!
 
Sql commands
Sql commandsSql commands
Sql commands
Pooja Dixit
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Languagepandey3045_bit
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
Balqees Al.Mubarak
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ehsan Hamzei
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
Vibrant Technologies & Computers
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
Smriti Jain
 

What's hot (19)

Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In Sql
 
Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd session
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Sql basics
Sql  basicsSql  basics
Sql basics
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL select clause
SQL select clauseSQL select clause
SQL select clause
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
 
Sql commands
Sql commandsSql commands
Sql commands
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Language
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
 
Introduction to mysql part 1
Introduction to mysql part 1Introduction to mysql part 1
Introduction to mysql part 1
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 

Viewers also liked

management skills improvement for engineers
management skills improvement for engineersmanagement skills improvement for engineers
management skills improvement for engineersMostafa Nayl | PMP | RMP
 
Cableado estructurado
Cableado estructuradoCableado estructurado
Cableado estructurado
Gabriela Ramirez
 
№ 8 (32), декабрь 2012
№ 8 (32), декабрь 2012№ 8 (32), декабрь 2012
My linked in_video
My linked in_videoMy linked in_video
My linked in_videoJ Rene Ward
 
Rwanda omni scire ltd exec_summary
Rwanda omni scire ltd exec_summaryRwanda omni scire ltd exec_summary
Rwanda omni scire ltd exec_summary
Jean Claude NSENGIMANA
 
Shaik Nizamuddin Profile - Financial Research
Shaik Nizamuddin Profile - Financial ResearchShaik Nizamuddin Profile - Financial Research
Shaik Nizamuddin Profile - Financial ResearchShaik Nizamuddin
 
ETA 1991 Super committee person Certificate
ETA 1991 Super committee person CertificateETA 1991 Super committee person Certificate
ETA 1991 Super committee person CertificateRon Hessman
 
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google Docs
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google DocsMasterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google Docs
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google DocsBirgitte Rubæk
 
Juan david blandon
Juan david blandonJuan david blandon
Juan david blandonIETI SD
 
CV Purnama Rudiarto
CV Purnama RudiartoCV Purnama Rudiarto
CV Purnama RudiartoPurnama rd
 
Cuadro comparativo entre monitor crt y monitor plasma
Cuadro comparativo entre monitor crt y monitor plasmaCuadro comparativo entre monitor crt y monitor plasma
Cuadro comparativo entre monitor crt y monitor plasma
José Daniel Castañeda Arias
 
Viguetas
ViguetasViguetas
Viguetas
Davico Davalos
 
La Organizacion
La OrganizacionLa Organizacion
tik Bab 2
tik Bab 2tik Bab 2
tik Bab 2
rayhan malik
 

Viewers also liked (20)

management skills improvement for engineers
management skills improvement for engineersmanagement skills improvement for engineers
management skills improvement for engineers
 
Alejita
AlejitaAlejita
Alejita
 
Cableado estructurado
Cableado estructuradoCableado estructurado
Cableado estructurado
 
12
1212
12
 
№ 8 (32), декабрь 2012
№ 8 (32), декабрь 2012№ 8 (32), декабрь 2012
№ 8 (32), декабрь 2012
 
Comunicatodiffida
ComunicatodiffidaComunicatodiffida
Comunicatodiffida
 
My linked in_video
My linked in_videoMy linked in_video
My linked in_video
 
Corpo formas
Corpo formasCorpo formas
Corpo formas
 
Rwanda omni scire ltd exec_summary
Rwanda omni scire ltd exec_summaryRwanda omni scire ltd exec_summary
Rwanda omni scire ltd exec_summary
 
Shaik Nizamuddin Profile - Financial Research
Shaik Nizamuddin Profile - Financial ResearchShaik Nizamuddin Profile - Financial Research
Shaik Nizamuddin Profile - Financial Research
 
ETA 1991 Super committee person Certificate
ETA 1991 Super committee person CertificateETA 1991 Super committee person Certificate
ETA 1991 Super committee person Certificate
 
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google Docs
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google DocsMasterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google Docs
Masterprojekt - Mennesket og maskinen - uden Netdansk!.docx - Google Docs
 
ISO27001LA
ISO27001LAISO27001LA
ISO27001LA
 
Juan david blandon
Juan david blandonJuan david blandon
Juan david blandon
 
CV Purnama Rudiarto
CV Purnama RudiartoCV Purnama Rudiarto
CV Purnama Rudiarto
 
Cuadro comparativo entre monitor crt y monitor plasma
Cuadro comparativo entre monitor crt y monitor plasmaCuadro comparativo entre monitor crt y monitor plasma
Cuadro comparativo entre monitor crt y monitor plasma
 
lebenslauf
lebenslauflebenslauf
lebenslauf
 
Viguetas
ViguetasViguetas
Viguetas
 
La Organizacion
La OrganizacionLa Organizacion
La Organizacion
 
tik Bab 2
tik Bab 2tik Bab 2
tik Bab 2
 

Similar to Bn1037 demo oracle sql

Constraints constraints of oracle data base management systems
Constraints  constraints of oracle data base management systemsConstraints  constraints of oracle data base management systems
Constraints constraints of oracle data base management systems
SHAKIR325211
 
Dms 22319 micro project
Dms 22319 micro projectDms 22319 micro project
Dms 22319 micro project
ARVIND SARDAR
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraintsVivek Singh
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
Md. Mahedee Hasan
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
Ahsan Kabir
 
Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3
MuhammadWaheed44
 
Database constraints
Database constraintsDatabase constraints
Database constraints
Fraboni Ec
 
Database constraints
Database constraintsDatabase constraints
Database constraints
Young Alista
 
Database constraints
Database constraintsDatabase constraints
Database constraints
James Wong
 
Database constraints
Database constraintsDatabase constraints
Database constraints
Luis Goldster
 
Database constraints
Database constraintsDatabase constraints
Database constraints
David Hoen
 
Database constraints
Database constraintsDatabase constraints
Database constraints
Tony Nguyen
 
Database constraints
Database constraintsDatabase constraints
Database constraints
Harry Potter
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
Vibrant Technologies & Computers
 
SQL200.3 Module 3
SQL200.3 Module 3SQL200.3 Module 3
SQL200.3 Module 3
Dan D'Urso
 
UNIT2.ppt
UNIT2.pptUNIT2.ppt
UNIT2.ppt
SaurabhLokare1
 
ms-sql-server-150223140402-conversion-gate02.pptx
ms-sql-server-150223140402-conversion-gate02.pptxms-sql-server-150223140402-conversion-gate02.pptx
ms-sql-server-150223140402-conversion-gate02.pptx
YashaswiniSrinivasan1
 
chapter 8 SQL.ppt
chapter 8 SQL.pptchapter 8 SQL.ppt
chapter 8 SQL.ppt
YitbarekMurche
 

Similar to Bn1037 demo oracle sql (20)

Constraints constraints of oracle data base management systems
Constraints  constraints of oracle data base management systemsConstraints  constraints of oracle data base management systems
Constraints constraints of oracle data base management systems
 
Dms 22319 micro project
Dms 22319 micro projectDms 22319 micro project
Dms 22319 micro project
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
Database constraints
Database constraintsDatabase constraints
Database constraints
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
 
SQL200.3 Module 3
SQL200.3 Module 3SQL200.3 Module 3
SQL200.3 Module 3
 
SQL
SQLSQL
SQL
 
UNIT2.ppt
UNIT2.pptUNIT2.ppt
UNIT2.ppt
 
ms-sql-server-150223140402-conversion-gate02.pptx
ms-sql-server-150223140402-conversion-gate02.pptxms-sql-server-150223140402-conversion-gate02.pptx
ms-sql-server-150223140402-conversion-gate02.pptx
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
 
chapter 8 SQL.ppt
chapter 8 SQL.pptchapter 8 SQL.ppt
chapter 8 SQL.ppt
 

More from conline training

Bn 1024 demo ccnp
Bn 1024 demo  ccnpBn 1024 demo  ccnp
Bn 1024 demo ccnp
conline training
 
Bn 1023 demo network security
Bn 1023 demo  network securityBn 1023 demo  network security
Bn 1023 demo network security
conline training
 
Bn 1023 demo ccna
Bn 1023 demo  ccnaBn 1023 demo  ccna
Bn 1023 demo ccna
conline training
 
Bn 1022 demo mcse 2012
Bn 1022 demo  mcse 2012Bn 1022 demo  mcse 2012
Bn 1022 demo mcse 2012
conline training
 
Bn 1021 demo digital marketing
Bn 1021 demo  digital marketingBn 1021 demo  digital marketing
Bn 1021 demo digital marketing
conline training
 
Bn 1019 demo sql server 2012
Bn 1019 demo  sql server 2012Bn 1019 demo  sql server 2012
Bn 1019 demo sql server 2012
conline training
 
Bn 1018 demo pl sql
Bn 1018 demo  pl sqlBn 1018 demo  pl sql
Bn 1018 demo pl sql
conline training
 
Bn 1016 demo postgre sql-online-training
Bn 1016 demo  postgre sql-online-trainingBn 1016 demo  postgre sql-online-training
Bn 1016 demo postgre sql-online-training
conline training
 
B10014 ppt for msbi
B10014 ppt for msbiB10014 ppt for msbi
B10014 ppt for msbi
conline training
 
B1015 demo on selenium testing tools
B1015 demo on selenium testing toolsB1015 demo on selenium testing tools
B1015 demo on selenium testing tools
conline training
 
Bn1038 demo pega
Bn1038 demo  pegaBn1038 demo  pega
Bn1038 demo pega
conline training
 
Bn1033 demo sap basis
Bn1033 demo  sap basisBn1033 demo  sap basis
Bn1033 demo sap basis
conline training
 
Bn1032 demo sap bo
Bn1032 demo  sap boBn1032 demo  sap bo
Bn1032 demo sap bo
conline training
 
Bn1031 demo sap ehs
Bn1031 demo sap ehsBn1031 demo sap ehs
Bn1031 demo sap ehs
conline training
 
Bn1030 oracle dba
Bn1030 oracle dbaBn1030 oracle dba
Bn1030 oracle dba
conline training
 
Bn1029 demo sap sd
Bn1029 demo  sap sdBn1029 demo  sap sd
Bn1029 demo sap sd
conline training
 
Bn1028 demo hadoop administration and development
Bn1028 demo  hadoop administration and developmentBn1028 demo  hadoop administration and development
Bn1028 demo hadoop administration and development
conline training
 
Bn1025 demo basic unix
Bn1025 demo  basic unixBn1025 demo  basic unix
Bn1025 demo basic unix
conline training
 
Bn1013 demo sap success factors
Bn1013 demo  sap success factorsBn1013 demo  sap success factors
Bn1013 demo sap success factors
conline training
 
Bn1012 demo ppt sap pm
Bn1012 demo ppt sap pmBn1012 demo ppt sap pm
Bn1012 demo ppt sap pm
conline training
 

More from conline training (20)

Bn 1024 demo ccnp
Bn 1024 demo  ccnpBn 1024 demo  ccnp
Bn 1024 demo ccnp
 
Bn 1023 demo network security
Bn 1023 demo  network securityBn 1023 demo  network security
Bn 1023 demo network security
 
Bn 1023 demo ccna
Bn 1023 demo  ccnaBn 1023 demo  ccna
Bn 1023 demo ccna
 
Bn 1022 demo mcse 2012
Bn 1022 demo  mcse 2012Bn 1022 demo  mcse 2012
Bn 1022 demo mcse 2012
 
Bn 1021 demo digital marketing
Bn 1021 demo  digital marketingBn 1021 demo  digital marketing
Bn 1021 demo digital marketing
 
Bn 1019 demo sql server 2012
Bn 1019 demo  sql server 2012Bn 1019 demo  sql server 2012
Bn 1019 demo sql server 2012
 
Bn 1018 demo pl sql
Bn 1018 demo  pl sqlBn 1018 demo  pl sql
Bn 1018 demo pl sql
 
Bn 1016 demo postgre sql-online-training
Bn 1016 demo  postgre sql-online-trainingBn 1016 demo  postgre sql-online-training
Bn 1016 demo postgre sql-online-training
 
B10014 ppt for msbi
B10014 ppt for msbiB10014 ppt for msbi
B10014 ppt for msbi
 
B1015 demo on selenium testing tools
B1015 demo on selenium testing toolsB1015 demo on selenium testing tools
B1015 demo on selenium testing tools
 
Bn1038 demo pega
Bn1038 demo  pegaBn1038 demo  pega
Bn1038 demo pega
 
Bn1033 demo sap basis
Bn1033 demo  sap basisBn1033 demo  sap basis
Bn1033 demo sap basis
 
Bn1032 demo sap bo
Bn1032 demo  sap boBn1032 demo  sap bo
Bn1032 demo sap bo
 
Bn1031 demo sap ehs
Bn1031 demo sap ehsBn1031 demo sap ehs
Bn1031 demo sap ehs
 
Bn1030 oracle dba
Bn1030 oracle dbaBn1030 oracle dba
Bn1030 oracle dba
 
Bn1029 demo sap sd
Bn1029 demo  sap sdBn1029 demo  sap sd
Bn1029 demo sap sd
 
Bn1028 demo hadoop administration and development
Bn1028 demo  hadoop administration and developmentBn1028 demo  hadoop administration and development
Bn1028 demo hadoop administration and development
 
Bn1025 demo basic unix
Bn1025 demo  basic unixBn1025 demo  basic unix
Bn1025 demo basic unix
 
Bn1013 demo sap success factors
Bn1013 demo  sap success factorsBn1013 demo  sap success factors
Bn1013 demo sap success factors
 
Bn1012 demo ppt sap pm
Bn1012 demo ppt sap pmBn1012 demo ppt sap pm
Bn1012 demo ppt sap pm
 

Recently uploaded

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 

Recently uploaded (20)

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 

Bn1037 demo oracle sql

  • 1. Introduction to Oracle Structured Query Language BN1037 – Demo PPT Demo Oracle SQL
  • 2. http://www.conlinetraining.com/courses/sql-online-training/ Oracle SQL Course Details • Basic SQL Statement • Restricting and Sorting Data • Single Row Functions • Displaying Data from Multiple Tables • Aggregating Data by Using Group Functions • Writing Sub queries • Sqlplus, isqlplus • Manipulating Data • Managing Tables, Constraints • Views • Other Database Objects • Controlling User Access • Using Set Operators • Oracle Extensions to DML and DDL Statements
  • 3. http://www.conlinetraining.com/courses/sql-online-training/ Oracle Constraints types Constraints: -- Constraints apply specific rules to data, ensuring the data conforms to the requirements defined. There are a number of different kinds of constraints. There are two ways to apply constraint into Database. 1)Column level Constraint. 2)Table Level Constraint.
  • 4. http://www.conlinetraining.com/courses/sql-online-training/ Types Of Constraints • Not NULL • Primary key • Unique • Foreign Key • Check • Let's look at each of these in a little more detail.
  • 5. http://www.conlinetraining.com/courses/sql-online-training/ NOT NULL Constraints • NOT NULL constraints are in-line constraints that indicate that a column can not contain NULL values. For example, the PERSON_ID column is defined as NOT NULL in that example. • If you need to add a NOT NULL constraint to a table after the fact, simply use the alter table command as in this example: • Syntax:- • create table customer (status char(3) not null, val number not null); • Alter Table Table Name Modify( person_id NOT NULL); • When copying tables, beware that NULL values many not copy properly.
  • 6. http://www.conlinetraining.com/courses/sql-online-training/ Primary Key Constraints • Primary key constraints define a column or series of columns that uniquely identify a given row in a table. Defining a primary key on a table is optional and you can only define a single primary key on a table. A primary key constraint can consist of one or many columns (up to 32 ). Any column that is defined as a primary key column is automatically set with a NOT NULL status. • Syntax:-create table customer (status_id Number CONSTRAINT CONSTRAINT _NAME ); • If you need to primary key constraint to a table after the fact, simply use the alter table command. • ALTER TABLE customer ADD CONSTRAINT pk_my_status PRIMARY KEY (status_id);
  • 7. http://www.conlinetraining.com/courses/sql-online-training/ Unique Constraints • Unique constraints are like alternative primary key constraints. • A unique constraint defines a column, or series of columns, that must be unique in value. • You can have a number of unique constraints defined and the columns can have NULL values in them, unlike a column that belongs to a primary key constraint. • If you need to add unique key constraints to a table after the fact, simply use the alter table command. • ALTER TABLE my_status ADD CONSTRAINT uk_my_status UNIQUE (status_id, person_id);
  • 8. http://www.conlinetraining.com/courses/sql-online-training/ Foreign Key Constraints • A foreign key constraint is used to enforce a relationship between two tables. As an example, take the case of two tables, ITEM and PART. These tables have a relationship (an item can have none, one or many parts). Foreign key constraints help to enforce that relationship • Well, foreign key constraints help to enforce the types of relationships between tables we have just demonstrated. In this example we will create the ITEM and PART table. In the process of doing so, we will create a foreign key relationship between the two: – CREATE TABLE part – ( Part_no NUMBER PRIMARY KEY, – Part_desc VARCHAR2(200) NOT NULL );
  • 9. http://www.conlinetraining.com/courses/sql-online-training/ Create Table • CREATE TABLE item (Item_no NUMBER,Part_no NUMBER,Item_desc varchar2(200) NOT NULL, CONSTRAINT fk_item_part FOREIGN KEY (part_no) REFERENCES PART (part_no), CON STRAINT pk_item PRIMARY KEY (item_no, part_no) ); • In this example, what we are really interested in is the creation of the ITEM table. First, note that we defined the primary key as an out of line primary key. This is because it is a composite primary key and composite primary keys have to be defined out of line. • Now, we are interested in the foreign key definition. You must define foreign key constraints as out of line constraints, as we have done in our example. Here is a snippet of the command that we used: • CONSTRAINT fk_item_part FOREIGN KEY (part_no) REFERENCES part (part_no);
  • 10. http://www.conlinetraining.com/courses/sql-online-training/ Alter Table • If you need to add foreign key constraints to a table after the fact, simply use the alter table command as seen here: • ALTER TABLE my_status ADD CONSTRAINT fk_my_status FOREIGN KEY (part_no) REFERENCES part (part_no);
  • 11. http://www.conlinetraining.com/courses/sql-online-training/ Check Constraints • Check constraints validate that values in a given column meet a specific criteria. • For example, you could create a check constraint on a varchar2 column so it only can contain the values T or F as in this example: • Create table my_status ( status_id NUMBER PRIMARY KEY, person_id NUMBER NOT NULL, active_record VARCHAR2(1) NOT NULL CHECK (UPPER(active_record)='T' or UPPER(active_record)='F'), person_ssn VARCHAR2(20) CONSTRAINT un_person_ssn UNIQUE );
  • 13. http://www.conlinetraining.com/courses/sql-online-training/ Email us : info@conlineTraining.com Visit : www.conlinetraining.com