SlideShare a Scribd company logo
International Islamic University Malaysia
Department of Information Systems
Kulliyyah of Information & Communication Technology
LECTURE 4:
BASIC SELECT
STATEMENTS
Dr. Mira Kartiwi
Capabilities of SQL SELECT Statements
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Selection (Restriction) – Allows for the retrieval
of rows that satisfy certain specified condition
(predicate).
 Projection – Allows for the retrieval of specified
columns (attributes).
 Joining – Allows for the linking of data in
different tables.
More About SELECT
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 SELECT is technically a Data Manipulation
Language (DML). However, Oracle does not
classify it as such.
 You can write SELECT statements on multiple
lines. However, you are not allowed to split or
abbreviate keywords.
 SELECT statements are not case sensitive.
More About SELECT
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Clauses are usually placed on separate
lines.
 Indents are used to enhance readability.
Basic SELECT Statement
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 SELECT *| { [DISTINCT] column | expression
[alias],...}
FROM table;
 SELECT identifies what column
 FROM identifies which table
Selecting All Columns
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT *
FROM doctor;
Selecting Specific Columns
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name, area
FROM doctor;
Using Arithmetic Operations
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name, (annual_bonus+ 500)
FROM doctor;
 Four arithmetic operations according to precedence:
(*, /), (+, -)
 Operators of the same priority are evaluated from left to
right.
 Parentheses are used to force prioritized evaluation and
to clarify statements.
Operator Precedence and
Parantheses
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name, annual_bonus,
10*annual_bonus+500
FROM doctor;
SELECT doc_name, annual_bonus,
10*(annual_bonus+500)
FROM doctor;
 --What is the difference????
NULL Values
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 How many doctor has Null value in the
result???
Why??
 Arithmetic expressions containing a null value
evaluate to null
Column Alias
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Renames a column heading.
 Useful with calculations.
 Immediately follows the column name – there can also
be the optional AS keyword between column name and
alias.
 Requires double quotation marks if it contains spaces or
special characters or is case sensitive.
Column Alias
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 SELECT doc_name AS name, annual_bonus
FROM doctor
 SELECT doc_name AS “Name”, annual_bonus AS
“Bonus”
FROM doctor
 SELECT doc_name, annual_bonus AS “Bonus
Upgrade”
FROM doctor
Concatenation Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name||area AS “Doctor”
FROM doctor;
 Concatenates columns or character strings to
other columns.
 Is represented by two vertical bars (||).
 Creates a resultant column that is a character
expression.
Literal Character String
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name || ' is from ' || area AS “DOCTOR”
FROM doctor;
 A literal is a character, a number, or a date included in
the SELECT statement.
 Date and character literal values must be enclosed
within single quotation marks.
 Each character string is output once for each row
returned.
Eliminating Duplicate Rows
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT DISTINCT area
FROM doctor;
-- how many area??????
Limiting the Rows Selected
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT *| { [DISTINCT] column | expression
[alias],...}
FROM table
WHERE condition(s);
The Where Clause
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 The WHERE clause can be added to the
SELECT statement to restrict the results to
rows that satisfy a specified condition.
 Rows that do not meet the condition will not be
included in the results.
Comparisons
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 The two expressions must be of the same type
 Character string literals should be enclosed in
single quotes
 Date literals should be of the form 'DD-MON-
YY'
 Numeric literals should consist of digits and
optionally, a decimal and/or sign (no commas
or dollar signs)
Comparison Conditions
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Equal (=)
 Greater than (>)
 Greater than or equal to (>=)
 Less than (<)
 Less than or equal to (<=)
 Not equal to (<>, !=, ^=)
WHERE Clause
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name
FROM doctor
WHERE chgperappt >= 40;
 --What does it means?????
 -- how many doctor name James?????
 -- What area is Stevenson?????
Other Comparison Conditions
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Between two values (inclusive) –
BETWEEN... AND...
 IN (set)
 LIKE
 IS NULL
 IS NOT NULL
BETWEEN Condition
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Several special operators serve as shortcuts
for longer expressions.
One is the BETWEEN operator.
 It is used to determine whether or not a value
lies within a specific range (including the end
points)
 General syntax:Expression1 BETWEEN Expression2 AND
Expression 3
BETWEEN Condition
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_name, annual_bonus
FROM doctor
WHERE annual_bonus BETWEEN 2000 AND
4000;
-- how many people?
The IN Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Used to see if a value occurs in a set of
possible values
 The set of possible values is specified
within parentheses with commas between
values
IN Condition
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT doc_id, doc_name, area
FROM doctor
WHERE doc_id IN (100,356, 558);
-- what area are they in???????
The IS NULL Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Any comparison to a null value that uses the
standard comparison operators will not yield a
match.
 If a check for null values is needed, the IS
NULL operator must be used.
The IS NULL Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Display the IDs of doctors that do not receive
annual bonuses.
SELECT doc_id
FROM doctor
WHERE annual_bonus IS NULL;
--What is the name?---
The LIKE Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Used in conjunction with wildcard characters
to match character string patterns
 % is used to match zero or more characters
 _ is used to match a single character
 Wildcards cannot be used without the LIKE
operator
 The LIKE operator should not be used without
wildcards
LIKE Condition
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
SELECT *
FROM doctor
WHERE doc_name LIKE 'J%';
-- change to lowercase j
Note:
– Represents any sequence of zero or more characters
(%)
– Represents a single character (_)
The LIKE Operator
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
Display the full name and phone number for
customers whose phone number begins with 549-67
SELECT pt_lname || ', ' || pt_fname "FULL NAME"
FROM patient
WHERE ptdob LIKE ’13-MAY-__' ;
Logical Operators
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 3 standard logical operators (AND, OR, and
NOT) are used to combine expressions
 AND will return a value of true only if both expressions
are true
 OR will return a value of true if either or both of the
expressions are true
 NOT will return the opposite value of the expression.
 Order of precedence: NOT, AND, OR
Other NOT Operators
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 The NOT operator can also be used in
conjunction with the special operators as
follows:
 NOT BETWEEN
 NOT IN
 IS NOT NULL
 NOT LIKE
NULL and NOT NULL Conditions
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 SELECT docid, docname, annual_bonus
FROM doctor
WHERE annual_bonus IS NULL;
TO NEGATE ..
 SELECT docid, docname, annual_bonus
FROM doctor
WHERE annual_bonus IS NOT NULL;
Lab Assignment 1
International Islamic University Malaysia
Kuliyyah of ICT – Department of Information Systems
 Run the hospital script and create a question
in English as well as its SQL query that
generates:
 NULL values
 Values not within a specific range
 List of names that started from or ended with
specific letter

More Related Content

What's hot

IRJET- Searching Admission Methodology(SAM): An Android Based Application...
IRJET-  	  Searching Admission Methodology(SAM): An Android Based Application...IRJET-  	  Searching Admission Methodology(SAM): An Android Based Application...
IRJET- Searching Admission Methodology(SAM): An Android Based Application...
IRJET Journal
 
IRJET - College Recommendation System using Machine Learning
IRJET - College Recommendation System using Machine LearningIRJET - College Recommendation System using Machine Learning
IRJET - College Recommendation System using Machine Learning
IRJET Journal
 
FESCCO: Fuzzy Expert System for Career Counselling
FESCCO: Fuzzy Expert System for Career CounsellingFESCCO: Fuzzy Expert System for Career Counselling
FESCCO: Fuzzy Expert System for Career Counselling
rahulmonikasharma
 
Holistic Approach for Arabic Word Recognition
Holistic Approach for Arabic Word RecognitionHolistic Approach for Arabic Word Recognition
Holistic Approach for Arabic Word Recognition
Editor IJCATR
 
Sql comparison keywords like, in, between..
Sql comparison keywords   like, in, between..Sql comparison keywords   like, in, between..
Sql comparison keywords like, in, between..Vivek Singh
 
Cs141 mid termexam v5_solution
Cs141 mid termexam v5_solutionCs141 mid termexam v5_solution
Cs141 mid termexam v5_solution
Fahadaio
 
MICRO PROJECT 22319 DMS
MICRO PROJECT 22319 DMSMICRO PROJECT 22319 DMS
MICRO PROJECT 22319 DMS
ARVIND SARDAR
 
Dbms keys
Dbms keysDbms keys
Dbms keys
pyingkodi maran
 
Result generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organizationResult generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organization
eSAT Journals
 
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
iosrjce
 

What's hot (13)

IRJET- Searching Admission Methodology(SAM): An Android Based Application...
IRJET-  	  Searching Admission Methodology(SAM): An Android Based Application...IRJET-  	  Searching Admission Methodology(SAM): An Android Based Application...
IRJET- Searching Admission Methodology(SAM): An Android Based Application...
 
IRJET - College Recommendation System using Machine Learning
IRJET - College Recommendation System using Machine LearningIRJET - College Recommendation System using Machine Learning
IRJET - College Recommendation System using Machine Learning
 
FESCCO: Fuzzy Expert System for Career Counselling
FESCCO: Fuzzy Expert System for Career CounsellingFESCCO: Fuzzy Expert System for Career Counselling
FESCCO: Fuzzy Expert System for Career Counselling
 
Holistic Approach for Arabic Word Recognition
Holistic Approach for Arabic Word RecognitionHolistic Approach for Arabic Word Recognition
Holistic Approach for Arabic Word Recognition
 
Sql comparison keywords like, in, between..
Sql comparison keywords   like, in, between..Sql comparison keywords   like, in, between..
Sql comparison keywords like, in, between..
 
Cs141 mid termexam v5_solution
Cs141 mid termexam v5_solutionCs141 mid termexam v5_solution
Cs141 mid termexam v5_solution
 
Resume
ResumeResume
Resume
 
MICRO PROJECT 22319 DMS
MICRO PROJECT 22319 DMSMICRO PROJECT 22319 DMS
MICRO PROJECT 22319 DMS
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
Result generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organizationResult generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organization
 
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
Towards a new ontology of the Moroccan Post-baccalaureate learner profile for...
 
Mba adv-(2011-12)
Mba adv-(2011-12)Mba adv-(2011-12)
Mba adv-(2011-12)
 
Evil Hangman report
Evil Hangman reportEvil Hangman report
Evil Hangman report
 

Viewers also liked

AT&T Wholesale VoIP
AT&T Wholesale VoIPAT&T Wholesale VoIP
AT&T Wholesale VoIP
Rob Pedigo
 
Guardian Education article March 2015
Guardian Education article March 2015Guardian Education article March 2015
Guardian Education article March 2015AlisonPeacock663
 
15review(abstract classandinterfaces)
15review(abstract classandinterfaces)15review(abstract classandinterfaces)
15review(abstract classandinterfaces)
IIUM
 
Conversation between she and i
Conversation between she and iConversation between she and i
Conversation between she and i
C Adams
 
Diseño plan accion tutorial
Diseño plan accion tutorialDiseño plan accion tutorial
Diseño plan accion tutorial
JHONN JAIRO ANGARITA LOPEZ
 
Imaq Usb Grab P1
Imaq Usb Grab P1Imaq Usb Grab P1
Imaq Usb Grab P1
Joao Kogler
 
certificate of participation
certificate of participationcertificate of participation
certificate of participationMesfin Kebede
 
01 introduction to oop and java
01 introduction to oop and java01 introduction to oop and java
01 introduction to oop and java
রাকিন রাকিন
 

Viewers also liked (9)

Diseño plan accion tutorial 1
Diseño plan accion tutorial 1Diseño plan accion tutorial 1
Diseño plan accion tutorial 1
 
AT&T Wholesale VoIP
AT&T Wholesale VoIPAT&T Wholesale VoIP
AT&T Wholesale VoIP
 
Guardian Education article March 2015
Guardian Education article March 2015Guardian Education article March 2015
Guardian Education article March 2015
 
15review(abstract classandinterfaces)
15review(abstract classandinterfaces)15review(abstract classandinterfaces)
15review(abstract classandinterfaces)
 
Conversation between she and i
Conversation between she and iConversation between she and i
Conversation between she and i
 
Diseño plan accion tutorial
Diseño plan accion tutorialDiseño plan accion tutorial
Diseño plan accion tutorial
 
Imaq Usb Grab P1
Imaq Usb Grab P1Imaq Usb Grab P1
Imaq Usb Grab P1
 
certificate of participation
certificate of participationcertificate of participation
certificate of participation
 
01 introduction to oop and java
01 introduction to oop and java01 introduction to oop and java
01 introduction to oop and java
 

Similar to Info 2102 l4 basic select statement lab1

Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction System
IRJET Journal
 
IRJET- College Recommendation System for Admission
IRJET- College Recommendation System for AdmissionIRJET- College Recommendation System for Admission
IRJET- College Recommendation System for Admission
IRJET Journal
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
Product School
 
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptxPPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
amansharma1723
 
IRJET- Intelligence Quotient Tester
IRJET-  	  Intelligence Quotient TesterIRJET-  	  Intelligence Quotient Tester
IRJET- Intelligence Quotient Tester
IRJET Journal
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
Vibrant Technologies & Computers
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexSalesforce Developers
 
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
Edgar Alejandro Villegas
 
A_Research_Paper_on_College_Management_S.pdf
A_Research_Paper_on_College_Management_S.pdfA_Research_Paper_on_College_Management_S.pdf
A_Research_Paper_on_College_Management_S.pdf
MUSHAMHARIKIRAN6737
 
A Research Paper On College Management System
A Research Paper On College Management SystemA Research Paper On College Management System
A Research Paper On College Management System
Tony Lisko
 
Detection of Structured Query Language Injection Attacks Using Machine Learni...
Detection of Structured Query Language Injection Attacks Using Machine Learni...Detection of Structured Query Language Injection Attacks Using Machine Learni...
Detection of Structured Query Language Injection Attacks Using Machine Learni...
AIRCC Publishing Corporation
 
Skill Gap Analysis for Improved Skills and Quality Deliverables
Skill Gap Analysis for Improved Skills and Quality DeliverablesSkill Gap Analysis for Improved Skills and Quality Deliverables
Skill Gap Analysis for Improved Skills and Quality Deliverables
IJERA Editor
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docx
johniemcm5zt
 
Shravana internship in ICT academy in collaboration with caogemini.pptx
Shravana internship in ICT academy in collaboration with caogemini.pptxShravana internship in ICT academy in collaboration with caogemini.pptx
Shravana internship in ICT academy in collaboration with caogemini.pptx
ShravanaK1
 
DBMS winterc 18.pdf
DBMS winterc 18.pdfDBMS winterc 18.pdf
DBMS winterc 18.pdf
SohamKotalwar1
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SabrinaShanta2
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SaiMiryala1
 
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGESCASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
IRJET Journal
 
College mgmnt system
College mgmnt systemCollege mgmnt system
College mgmnt systemSayali Birari
 

Similar to Info 2102 l4 basic select statement lab1 (20)

Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction System
 
Db presn(1)
Db presn(1)Db presn(1)
Db presn(1)
 
IRJET- College Recommendation System for Admission
IRJET- College Recommendation System for AdmissionIRJET- College Recommendation System for Admission
IRJET- College Recommendation System for Admission
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
 
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptxPPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
PPT Lecture 2.3.4 Cursortttttttttttttttttttttttttttttttts.pptx
 
IRJET- Intelligence Quotient Tester
IRJET-  	  Intelligence Quotient TesterIRJET-  	  Intelligence Quotient Tester
IRJET- Intelligence Quotient Tester
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and Apex
 
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
 
A_Research_Paper_on_College_Management_S.pdf
A_Research_Paper_on_College_Management_S.pdfA_Research_Paper_on_College_Management_S.pdf
A_Research_Paper_on_College_Management_S.pdf
 
A Research Paper On College Management System
A Research Paper On College Management SystemA Research Paper On College Management System
A Research Paper On College Management System
 
Detection of Structured Query Language Injection Attacks Using Machine Learni...
Detection of Structured Query Language Injection Attacks Using Machine Learni...Detection of Structured Query Language Injection Attacks Using Machine Learni...
Detection of Structured Query Language Injection Attacks Using Machine Learni...
 
Skill Gap Analysis for Improved Skills and Quality Deliverables
Skill Gap Analysis for Improved Skills and Quality DeliverablesSkill Gap Analysis for Improved Skills and Quality Deliverables
Skill Gap Analysis for Improved Skills and Quality Deliverables
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docx
 
Shravana internship in ICT academy in collaboration with caogemini.pptx
Shravana internship in ICT academy in collaboration with caogemini.pptxShravana internship in ICT academy in collaboration with caogemini.pptx
Shravana internship in ICT academy in collaboration with caogemini.pptx
 
DBMS winterc 18.pdf
DBMS winterc 18.pdfDBMS winterc 18.pdf
DBMS winterc 18.pdf
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGESCASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
 
College mgmnt system
College mgmnt systemCollege mgmnt system
College mgmnt system
 

More from IIUM

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
IIUM
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
IIUM
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
IIUM
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimedia
IIUM
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblock
IIUM
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
IIUM
 
Group p1
Group p1Group p1
Group p1
IIUM
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seo
IIUM
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009
IIUM
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lforms
IIUM
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answer
IIUM
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
IIUM
 
Heaps
HeapsHeaps
Heaps
IIUM
 
Report format
Report formatReport format
Report format
IIUM
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelines
IIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
IIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
IIUM
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516
IIUM
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotations
IIUM
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
IIUM
 

More from IIUM (20)

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimedia
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblock
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
 
Group p1
Group p1Group p1
Group p1
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seo
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lforms
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answer
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
 
Heaps
HeapsHeaps
Heaps
 
Report format
Report formatReport format
Report format
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelines
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotations
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
 

Recently uploaded

Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdfAlcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Dr Jeenal Mistry
 
micro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdfmicro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdf
Anurag Sharma
 
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in DehradunDehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
chandankumarsmartiso
 
New Drug Discovery and Development .....
New Drug Discovery and Development .....New Drug Discovery and Development .....
New Drug Discovery and Development .....
NEHA GUPTA
 
Physiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of TastePhysiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of Taste
MedicoseAcademics
 
Physiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdfPhysiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdf
MedicoseAcademics
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Dr. Rabia Inam Gandapore
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animals
Shweta
 
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #GirlsFor Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
Savita Shen $i11
 
planning for change nursing Management ppt
planning for change nursing Management pptplanning for change nursing Management ppt
planning for change nursing Management ppt
Thangamjayarani
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Oleg Kshivets
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Dr. Rabia Inam Gandapore
 
Ocular injury ppt Upendra pal optometrist upums saifai etawah
Ocular injury  ppt  Upendra pal  optometrist upums saifai etawahOcular injury  ppt  Upendra pal  optometrist upums saifai etawah
Ocular injury ppt Upendra pal optometrist upums saifai etawah
pal078100
 
Basavarajeeyam - Ayurvedic heritage book of Andhra pradesh
Basavarajeeyam - Ayurvedic heritage book of Andhra pradeshBasavarajeeyam - Ayurvedic heritage book of Andhra pradesh
Basavarajeeyam - Ayurvedic heritage book of Andhra pradesh
Dr. Madduru Muni Haritha
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
vimalpl1234
 
Light House Retreats: Plant Medicine Retreat Europe
Light House Retreats: Plant Medicine Retreat EuropeLight House Retreats: Plant Medicine Retreat Europe
Light House Retreats: Plant Medicine Retreat Europe
Lighthouse Retreat
 
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
bkling
 
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptxANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
Swetaba Besh
 
KDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologistsKDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologists
د.محمود نجيب
 
Are There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdfAre There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdf
Little Cross Family Clinic
 

Recently uploaded (20)

Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdfAlcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
 
micro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdfmicro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdf
 
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in DehradunDehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
Dehradun #ℂall #gIRLS Oyo Hotel 9719300533 #ℂall #gIRL in Dehradun
 
New Drug Discovery and Development .....
New Drug Discovery and Development .....New Drug Discovery and Development .....
New Drug Discovery and Development .....
 
Physiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of TastePhysiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of Taste
 
Physiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdfPhysiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdf
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animals
 
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #GirlsFor Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
For Better Surat #ℂall #Girl Service ❤85270-49040❤ Surat #ℂall #Girls
 
planning for change nursing Management ppt
planning for change nursing Management pptplanning for change nursing Management ppt
planning for change nursing Management ppt
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
 
Ocular injury ppt Upendra pal optometrist upums saifai etawah
Ocular injury  ppt  Upendra pal  optometrist upums saifai etawahOcular injury  ppt  Upendra pal  optometrist upums saifai etawah
Ocular injury ppt Upendra pal optometrist upums saifai etawah
 
Basavarajeeyam - Ayurvedic heritage book of Andhra pradesh
Basavarajeeyam - Ayurvedic heritage book of Andhra pradeshBasavarajeeyam - Ayurvedic heritage book of Andhra pradesh
Basavarajeeyam - Ayurvedic heritage book of Andhra pradesh
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
 
Light House Retreats: Plant Medicine Retreat Europe
Light House Retreats: Plant Medicine Retreat EuropeLight House Retreats: Plant Medicine Retreat Europe
Light House Retreats: Plant Medicine Retreat Europe
 
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
 
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptxANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF URINARY SYSTEM.pptx
 
KDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologistsKDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologists
 
Are There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdfAre There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdf
 

Info 2102 l4 basic select statement lab1

  • 1. International Islamic University Malaysia Department of Information Systems Kulliyyah of Information & Communication Technology LECTURE 4: BASIC SELECT STATEMENTS Dr. Mira Kartiwi
  • 2. Capabilities of SQL SELECT Statements International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Selection (Restriction) – Allows for the retrieval of rows that satisfy certain specified condition (predicate).  Projection – Allows for the retrieval of specified columns (attributes).  Joining – Allows for the linking of data in different tables.
  • 3. More About SELECT International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  SELECT is technically a Data Manipulation Language (DML). However, Oracle does not classify it as such.  You can write SELECT statements on multiple lines. However, you are not allowed to split or abbreviate keywords.  SELECT statements are not case sensitive.
  • 4. More About SELECT International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Clauses are usually placed on separate lines.  Indents are used to enhance readability.
  • 5. Basic SELECT Statement International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  SELECT *| { [DISTINCT] column | expression [alias],...} FROM table;  SELECT identifies what column  FROM identifies which table
  • 6. Selecting All Columns International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT * FROM doctor;
  • 7. Selecting Specific Columns International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name, area FROM doctor;
  • 8. Using Arithmetic Operations International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name, (annual_bonus+ 500) FROM doctor;  Four arithmetic operations according to precedence: (*, /), (+, -)  Operators of the same priority are evaluated from left to right.  Parentheses are used to force prioritized evaluation and to clarify statements.
  • 9. Operator Precedence and Parantheses International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name, annual_bonus, 10*annual_bonus+500 FROM doctor; SELECT doc_name, annual_bonus, 10*(annual_bonus+500) FROM doctor;  --What is the difference????
  • 10. NULL Values International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  How many doctor has Null value in the result??? Why??  Arithmetic expressions containing a null value evaluate to null
  • 11. Column Alias International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Renames a column heading.  Useful with calculations.  Immediately follows the column name – there can also be the optional AS keyword between column name and alias.  Requires double quotation marks if it contains spaces or special characters or is case sensitive.
  • 12. Column Alias International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  SELECT doc_name AS name, annual_bonus FROM doctor  SELECT doc_name AS “Name”, annual_bonus AS “Bonus” FROM doctor  SELECT doc_name, annual_bonus AS “Bonus Upgrade” FROM doctor
  • 13. Concatenation Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name||area AS “Doctor” FROM doctor;  Concatenates columns or character strings to other columns.  Is represented by two vertical bars (||).  Creates a resultant column that is a character expression.
  • 14. Literal Character String International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name || ' is from ' || area AS “DOCTOR” FROM doctor;  A literal is a character, a number, or a date included in the SELECT statement.  Date and character literal values must be enclosed within single quotation marks.  Each character string is output once for each row returned.
  • 15. Eliminating Duplicate Rows International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT DISTINCT area FROM doctor; -- how many area??????
  • 16. Limiting the Rows Selected International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT *| { [DISTINCT] column | expression [alias],...} FROM table WHERE condition(s);
  • 17. The Where Clause International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  The WHERE clause can be added to the SELECT statement to restrict the results to rows that satisfy a specified condition.  Rows that do not meet the condition will not be included in the results.
  • 18. Comparisons International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  The two expressions must be of the same type  Character string literals should be enclosed in single quotes  Date literals should be of the form 'DD-MON- YY'  Numeric literals should consist of digits and optionally, a decimal and/or sign (no commas or dollar signs)
  • 19. Comparison Conditions International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Equal (=)  Greater than (>)  Greater than or equal to (>=)  Less than (<)  Less than or equal to (<=)  Not equal to (<>, !=, ^=)
  • 20. WHERE Clause International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name FROM doctor WHERE chgperappt >= 40;  --What does it means?????  -- how many doctor name James?????  -- What area is Stevenson?????
  • 21. Other Comparison Conditions International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Between two values (inclusive) – BETWEEN... AND...  IN (set)  LIKE  IS NULL  IS NOT NULL
  • 22. BETWEEN Condition International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Several special operators serve as shortcuts for longer expressions. One is the BETWEEN operator.  It is used to determine whether or not a value lies within a specific range (including the end points)  General syntax:Expression1 BETWEEN Expression2 AND Expression 3
  • 23. BETWEEN Condition International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_name, annual_bonus FROM doctor WHERE annual_bonus BETWEEN 2000 AND 4000; -- how many people?
  • 24. The IN Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Used to see if a value occurs in a set of possible values  The set of possible values is specified within parentheses with commas between values
  • 25. IN Condition International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT doc_id, doc_name, area FROM doctor WHERE doc_id IN (100,356, 558); -- what area are they in???????
  • 26. The IS NULL Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Any comparison to a null value that uses the standard comparison operators will not yield a match.  If a check for null values is needed, the IS NULL operator must be used.
  • 27. The IS NULL Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Display the IDs of doctors that do not receive annual bonuses. SELECT doc_id FROM doctor WHERE annual_bonus IS NULL; --What is the name?---
  • 28. The LIKE Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Used in conjunction with wildcard characters to match character string patterns  % is used to match zero or more characters  _ is used to match a single character  Wildcards cannot be used without the LIKE operator  The LIKE operator should not be used without wildcards
  • 29. LIKE Condition International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems SELECT * FROM doctor WHERE doc_name LIKE 'J%'; -- change to lowercase j Note: – Represents any sequence of zero or more characters (%) – Represents a single character (_)
  • 30. The LIKE Operator International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems Display the full name and phone number for customers whose phone number begins with 549-67 SELECT pt_lname || ', ' || pt_fname "FULL NAME" FROM patient WHERE ptdob LIKE ’13-MAY-__' ;
  • 31. Logical Operators International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  3 standard logical operators (AND, OR, and NOT) are used to combine expressions  AND will return a value of true only if both expressions are true  OR will return a value of true if either or both of the expressions are true  NOT will return the opposite value of the expression.  Order of precedence: NOT, AND, OR
  • 32. Other NOT Operators International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  The NOT operator can also be used in conjunction with the special operators as follows:  NOT BETWEEN  NOT IN  IS NOT NULL  NOT LIKE
  • 33. NULL and NOT NULL Conditions International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  SELECT docid, docname, annual_bonus FROM doctor WHERE annual_bonus IS NULL; TO NEGATE ..  SELECT docid, docname, annual_bonus FROM doctor WHERE annual_bonus IS NOT NULL;
  • 34. Lab Assignment 1 International Islamic University Malaysia Kuliyyah of ICT – Department of Information Systems  Run the hospital script and create a question in English as well as its SQL query that generates:  NULL values  Values not within a specific range  List of names that started from or ended with specific letter