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
 
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
 
sql_data_manipulation.ppt
sql_data_manipulation.pptsql_data_manipulation.ppt
sql_data_manipulation.pptFleabagSeasone
 

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
 
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
 
sql_data_manipulation.ppt
sql_data_manipulation.pptsql_data_manipulation.ppt
sql_data_manipulation.ppt
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 

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.