SlideShare a Scribd company logo
1 of 4
Download to read offline
Leading Oracle Training center in Bangalore
DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047,
Name
Marks
All questions (including sub questions) carry 10 marks each. Duration: 20 minutes
1. Write a query to display the 5th highest salary among the employees table?
2. Write a query to display the employees whose salary is greater than the average salary of their
respective departments.
3. Write a query to add a unique constraint on column "email" from EMP table after it’s created?
4. Write a query to add a DEFAULT value of SAL column in EMP table to 5500 once it’s created?
5. What would be the possible outcome of following SQL statements? If ERROR, mention the reason.
a. select length(NULL||’abc’) from dual;
b. SELECT TRUNC (TRIM (' 505 .99 ')) FROM DUAL;
c. SELECT DEPTNO, COUNT (ENAME) FROM EMP WHERE COUNT (ENAME) > 5000 GROUP BY
DEPTNO;
d. UPDATE EMP SET (DEPTNO, SAL) = (10, 2000) WHERE SAL>500 AND JOB=’CLERK’;
Leading Oracle Training center in Bangalore
DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047,
e. select * from emp where comm=null;
f. SELECT ROUND(45.343,-2) FROM DUAL;
6. What is the maximum length of any OBJECT NAME in Oracle?
a. 30 chars
b. 32 chars
c. 255 chars
d. No limit
7. What does TRUNCATE does in additional to removing data? (Choose all that apply)
a. De-allocates memory used by the table
b. De-allocates storage space used by the table
c. Changes the tablespace of the table
d. Add more storage space to the table
e. Commits the removal operation
8. You run the below statement just after creating a sequence named SQL01. What will be the result?
SELECT SEQ01.CURRVAL FROM DUAL;
a. It displays the first value of the sequence
b. It throws an error
c. It displays the previous value of the sequence
d. It won’t display anything
9. Which all constraints will be copied while creating a table copying another table?
a. All constraints
b. Only Unique constraints
c. Only Foreign key constraints
d. Only NOT NULL constraints
e. No constraints are copied
10. What is the difference between WHERE clause and HAVING clause?
11. Which are the different types of Joins available in Oracle?
Leading Oracle Training center in Bangalore
DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047,
12. Which are the five sub-languages of SQL? Provide examples from each category.
13. Which are the different classifications of functions? Provide examples
14. What is the difference between WHERE clause and HAVING clause?
15. Write a query to display all employees who are working in department 10 at location Seattle.
Use tables Employees, departments and locations.
16. Write a query to display all employees who get a salary greater than 2000 and working as managers
or all employees who work as salesmen. Use EMP table
17. Write a query to display all employees whose name contains E or second last letter of name is T.
Leading Oracle Training center in Bangalore
DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047,
18. Write a query to display all employees and their managers. Use EMP table
19. Write a query to display all departments in Oxford with an average salary of 5000 or more. Use
tables employees, departments and locations.
20. Write a query to display 01-Aug-2012 in the format FIRST AUGUST TWENTY TWELVE.

More Related Content

What's hot

What's hot (10)

Dbms lab questions
Dbms lab questionsDbms lab questions
Dbms lab questions
 
1 z0 047
1 z0 0471 z0 047
1 z0 047
 
Dump Answers
Dump AnswersDump Answers
Dump Answers
 
1z0 061 exam-oracle database 12c sql fundamentals
1z0 061 exam-oracle database 12c sql fundamentals1z0 061 exam-oracle database 12c sql fundamentals
1z0 061 exam-oracle database 12c sql fundamentals
 
1 z0 001
1 z0 0011 z0 001
1 z0 001
 
newsql
newsqlnewsql
newsql
 
Sql subquery
Sql subquerySql subquery
Sql subquery
 
Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库
 
SQL subquery
SQL subquerySQL subquery
SQL subquery
 
ReactJS Mixins
ReactJS MixinsReactJS Mixins
ReactJS Mixins
 

Viewers also liked

Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answersiimjobs and hirist
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answersvijaybusu
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9kaashiv1
 
Sql interview questions
Sql interview questionsSql interview questions
Sql interview questionsnagesh Rao
 
Sql interview question part 8
Sql interview question part 8Sql interview question part 8
Sql interview question part 8kaashiv1
 
SQL practice questions set - 2
SQL practice questions set - 2SQL practice questions set - 2
SQL practice questions set - 2Mohd Tousif
 
Animation: The Basic Skills
Animation:  The Basic SkillsAnimation:  The Basic Skills
Animation: The Basic Skillswalkers
 
Oracle SQL, PL/SQL best practices
Oracle SQL, PL/SQL best practicesOracle SQL, PL/SQL best practices
Oracle SQL, PL/SQL best practicesSmitha Padmanabhan
 
Sql queries questions and answers
Sql queries questions and answersSql queries questions and answers
Sql queries questions and answersMichael Belete
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cNelson Calero
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projectsjwjablonski
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answerssheibansari
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and ArchitectureSidney Chen
 
Basic Concepts of Animation
Basic Concepts of AnimationBasic Concepts of Animation
Basic Concepts of Animationjamalharun
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overviewhonglee71
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginnersRam Sagar Mourya
 

Viewers also liked (20)

Sql queires
Sql queiresSql queires
Sql queires
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answers
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9
 
Sql interview questions
Sql interview questionsSql interview questions
Sql interview questions
 
Sql interview question part 8
Sql interview question part 8Sql interview question part 8
Sql interview question part 8
 
SQL practice questions set - 2
SQL practice questions set - 2SQL practice questions set - 2
SQL practice questions set - 2
 
Animation: The Basic Skills
Animation:  The Basic SkillsAnimation:  The Basic Skills
Animation: The Basic Skills
 
Oracle SQL, PL/SQL best practices
Oracle SQL, PL/SQL best practicesOracle SQL, PL/SQL best practices
Oracle SQL, PL/SQL best practices
 
Sql queries questions and answers
Sql queries questions and answersSql queries questions and answers
Sql queries questions and answers
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projects
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
Oracle Complete Interview Questions
Oracle Complete Interview QuestionsOracle Complete Interview Questions
Oracle Complete Interview Questions
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Best sql plsql material
Best sql plsql materialBest sql plsql material
Best sql plsql material
 
Basic Concepts of Animation
Basic Concepts of AnimationBasic Concepts of Animation
Basic Concepts of Animation
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 
Sql ppt
Sql pptSql ppt
Sql ppt
 

Similar to Oracle SQL Interview Questions for Freshers

Assg2 b 19121033-converted
Assg2 b 19121033-convertedAssg2 b 19121033-converted
Assg2 b 19121033-convertedSUSHANTPHALKE2
 
Sql intro
Sql introSql intro
Sql introglubox
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersBRIJESH KUMAR
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019ARVIND SARDAR
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019ARVIND SARDAR
 
Please accept this assignment if youre good in SQL!Task.docx
Please accept this assignment if youre good in SQL!Task.docxPlease accept this assignment if youre good in SQL!Task.docx
Please accept this assignment if youre good in SQL!Task.docxneedhamserena
 
Dbms question
Dbms questionDbms question
Dbms questionRicky Dky
 
lab2sql222222222222222222222222222222222
lab2sql222222222222222222222222222222222lab2sql222222222222222222222222222222222
lab2sql222222222222222222222222222222222227567
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessmentSaurabh K. Gupta
 
Database solution by m.moses wills
Database solution by m.moses willsDatabase solution by m.moses wills
Database solution by m.moses willsMoses Mwebaze
 
Database solution by m.moses wills
Database solution by m.moses willsDatabase solution by m.moses wills
Database solution by m.moses willsMoses Mwebaze
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL) MuhammadWaheed44
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxmetriohanzel
 
Page 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docxPage 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docxalfred4lewis58146
 
04 laboratory exercise 1
04 laboratory exercise 104 laboratory exercise 1
04 laboratory exercise 1Anne Lee
 

Similar to Oracle SQL Interview Questions for Freshers (20)

Assg2 b 19121033-converted
Assg2 b 19121033-convertedAssg2 b 19121033-converted
Assg2 b 19121033-converted
 
Sql intro
Sql introSql intro
Sql intro
 
Dbms record
Dbms recordDbms record
Dbms record
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for Developers
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019
 
Please accept this assignment if youre good in SQL!Task.docx
Please accept this assignment if youre good in SQL!Task.docxPlease accept this assignment if youre good in SQL!Task.docx
Please accept this assignment if youre good in SQL!Task.docx
 
Dbms question
Dbms questionDbms question
Dbms question
 
lab2sql222222222222222222222222222222222
lab2sql222222222222222222222222222222222lab2sql222222222222222222222222222222222
lab2sql222222222222222222222222222222222
 
DBMS LAB M.docx
DBMS LAB M.docxDBMS LAB M.docx
DBMS LAB M.docx
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
 
Sample paper i.p
Sample paper i.pSample paper i.p
Sample paper i.p
 
Sql wksht-2
Sql wksht-2Sql wksht-2
Sql wksht-2
 
Database solution by m.moses wills
Database solution by m.moses willsDatabase solution by m.moses wills
Database solution by m.moses wills
 
Database solution by m.moses wills
Database solution by m.moses willsDatabase solution by m.moses wills
Database solution by m.moses wills
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptx
 
Lab guide10
Lab guide10Lab guide10
Lab guide10
 
Page 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docxPage 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docx
 
04 laboratory exercise 1
04 laboratory exercise 104 laboratory exercise 1
04 laboratory exercise 1
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Oracle SQL Interview Questions for Freshers

  • 1. Leading Oracle Training center in Bangalore DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047, Name Marks All questions (including sub questions) carry 10 marks each. Duration: 20 minutes 1. Write a query to display the 5th highest salary among the employees table? 2. Write a query to display the employees whose salary is greater than the average salary of their respective departments. 3. Write a query to add a unique constraint on column "email" from EMP table after it’s created? 4. Write a query to add a DEFAULT value of SAL column in EMP table to 5500 once it’s created? 5. What would be the possible outcome of following SQL statements? If ERROR, mention the reason. a. select length(NULL||’abc’) from dual; b. SELECT TRUNC (TRIM (' 505 .99 ')) FROM DUAL; c. SELECT DEPTNO, COUNT (ENAME) FROM EMP WHERE COUNT (ENAME) > 5000 GROUP BY DEPTNO; d. UPDATE EMP SET (DEPTNO, SAL) = (10, 2000) WHERE SAL>500 AND JOB=’CLERK’;
  • 2. Leading Oracle Training center in Bangalore DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047, e. select * from emp where comm=null; f. SELECT ROUND(45.343,-2) FROM DUAL; 6. What is the maximum length of any OBJECT NAME in Oracle? a. 30 chars b. 32 chars c. 255 chars d. No limit 7. What does TRUNCATE does in additional to removing data? (Choose all that apply) a. De-allocates memory used by the table b. De-allocates storage space used by the table c. Changes the tablespace of the table d. Add more storage space to the table e. Commits the removal operation 8. You run the below statement just after creating a sequence named SQL01. What will be the result? SELECT SEQ01.CURRVAL FROM DUAL; a. It displays the first value of the sequence b. It throws an error c. It displays the previous value of the sequence d. It won’t display anything 9. Which all constraints will be copied while creating a table copying another table? a. All constraints b. Only Unique constraints c. Only Foreign key constraints d. Only NOT NULL constraints e. No constraints are copied 10. What is the difference between WHERE clause and HAVING clause? 11. Which are the different types of Joins available in Oracle?
  • 3. Leading Oracle Training center in Bangalore DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047, 12. Which are the five sub-languages of SQL? Provide examples from each category. 13. Which are the different classifications of functions? Provide examples 14. What is the difference between WHERE clause and HAVING clause? 15. Write a query to display all employees who are working in department 10 at location Seattle. Use tables Employees, departments and locations. 16. Write a query to display all employees who get a salary greater than 2000 and working as managers or all employees who work as salesmen. Use EMP table 17. Write a query to display all employees whose name contains E or second last letter of name is T.
  • 4. Leading Oracle Training center in Bangalore DTecH IT Education, No.1, 1st Cross, 1st Main, Ashwini layout, Off Koramangala ring road, Bangalore 560047, 18. Write a query to display all employees and their managers. Use EMP table 19. Write a query to display all departments in Oxford with an average salary of 5000 or more. Use tables employees, departments and locations. 20. Write a query to display 01-Aug-2012 in the format FIRST AUGUST TWENTY TWELVE.