SlideShare a Scribd company logo
Top 50 Oracle InterviewQuestionsand Answers
1. Difference betweenvarcharand varchar2 data types?
Varchar can store upto 2000 bytesandvarchar2 can store upto4000 bytes.Varcharwill occupy
space for NULL valuesandVarchar2 will notoccupyany space.Both are differedwithrespect
to space.
2. In which language Oracle has beendeveloped?
Oracle has beendevelopedusingCLanguage.
3. Whatis RAW datatype?
RAW datatype isusedto store valuesinbinarydataformat.The maximumsize foraraw ina table in
32767 bytes.
4. Whatis the use of NVL function?
The NVL functionisusedtoreplace NULL valueswithanotherorgivenvalue.Exampleis –
NVL(Value,replacevalue)
5. Whetherany commands are usedfor Months calculation?If so, What are they?
In Oracle,months_betweenfunctionisusedtofindnumberof monthsbetweenthe givendates.
Example is –
Months_between(Date1,Date 2)
6. Whatare nestedtables?
Nestedtable isadata type inOracle whichis usedtosupportcolumnscontainingmulti valued
attributes.Italsoholdentire subtable.
7. Whatis COALESCE function?
COALESCEfunctionisusedto returnthe value whichissetto be not null inthe list.If all valuesinthe
listare null,thenthe coalesce functionwill returnNULL.
Coalesce(value1,value2,value3,…)
8. Whatis BLOB datatype?
A BLOB data type isa varyinglengthbinarystringwhichisusedtostore twogigabytesmemory.
Lengthshouldbe specifiedinBytesforBLOB.
9. How do we representcommentsin Oracle?
CommentsinOracle can be representedintwoways –
1. Two dashes(–) beforebeginningof the line –Single statement
2. /*—— */ is usedtorepresentitas commentsforblockof statement
10. What is DML?
Data ManipulationLanguage (DML) isusedto access andmanipulate datainthe existing
objects. DML statementsare insert,select,update anddeleteanditwon’timplicitlycommitthe
currenttransaction.
11. What is the difference betweenTRANSLATEand REPLACE?
Translate isusedfor characterby character substitutionandReplace isusedsubstituteasingle
character witha word.
12. How do we display rows from the table without duplicates?
Duplicate rowscan be removedbyusingthe keywordDISTINCTinthe selectstatement.
13. What is the usage of Merge Statement?
Merge statementisusedto selectrowsfromone or more data source for updatingandinsertion
intoa table or a view.Itisusedtocombine multipleoperations.
14. What is NULL value in oracle?
NULL value representsmissingorunknowndata.Thisisusedas a place holderorrepresenteditinas
defaultentrytoindicate thatthere isnoactual data present.
15. What is USING Clause and give example?
The USING clause isusedto specifywiththe columntotestfor equalitywhentwotablesare joined.
[sql]Select*fromemployeejoinsalaryusingemployeeID[/sql]
Employee tablesjoinwiththe Salarytableswiththe EmployeeID.
16. What is keypreservedtable?
A table issetto be keypreservedtable if everykeyof the table canalsobe the keyof the resultof
the join. It guaranteestoreturnonlyone copyof eachrow fromthe base table.
17. What is WITH CHECK OPTION?
The WITH CHECK optionclause specifieschecklevel tobe done inDML statements.Itisusedto
preventchangestoa viewthatwouldproduce resultsthatare not includedinthe subquery.
18. What is the use of Aggregate functionsin Oracle?
Aggregate functionisafunctionwhere valuesof multiple rowsorrecordsare joinedtogethertoget
a single value output.Commonaggregate functionsare –
 Average
 Count
 Sum
19. What do you mean by GROUPBY Clause?
A GROUP BY clause canbe usedinselectstatementwhere itwill collectdataacrossmultiple records
and groupthe resultsbyone or more columns.
20. What is a sub query and what are the differenttypesof subqueries?
SubQueryis alsocalledasNestedQueryorInnerQuerywhichisusedto get data frommultiple
tables.A subqueryis addedinthe where clause of the mainquery.
There are twodifferenttypesof subqueries:
 Correlatedsubquery
A Correlated subquerycannotbe as independentquerybutcanreference columninatable listedin
the from listof the outerquery.
 Non-Correlatedsubquery
Thiscan be evaluatedasif itwere an independentquery.Resultsof the subqueryare submittedto
the mainqueryor parentquery.
21. What is cross join?
Crossjoinis definedasthe Cartesianproductof recordsfrom the tablespresentinthe join.Cross
joinwill produce resultwhichcombineseachrow fromthe firsttable withthe eachrow fromthe
secondtable.
22. What are temporal data types in Oracle?
Oracle providesfollowingtemporaldatatypes:
 Date Data Type – Differentformatsof Dates
 TimeStampDataType – Differentformatsof Time Stamp
 Interval DataType – Interval betweendatesandtime
23. How do we create privilegesinOracle?
A privilegeisnothingbutrighttoexecute anSQL queryorto access anotheruserobject.Privilege
can be givenassystemprivilege oruserprivilege.
[sql]GRANTuser1TOuser2 WITH MANAGER OPTION;[/sql]
24. What is VArray?
VArrayisan oracle data type usedtohave columnscontainingmultivaluedattributesanditcanhold
boundedarrayof values.
25. How do we get fielddetailsofa table?
Describe <Table_Name>isusedtogetthe fielddetailsof aspecifiedtable.
26. What is the difference betweenrename andalias?
Rename isa permanentname giventoa table ora columnwhereasAliasisatemporaryname given
to a table or column.Rename isnothingbutreplacementof name andAliasisan alternate name of
the table or column.
27. What is a View?
Viewisa logical table whichbasedonone ormore tablesor views. The tablesuponwhichthe view
isbasedare calledBase Tablesandit doesn’tcontaindata.
28. What is a cursor variable?
A cursor variable isassociatedwith differentstatementswhichcanholddifferentvaluesatruntime.
A cursor variable isakindof reference type.
29. What are cursor attributes?
Each cursor in Oracle has setof attributeswhichenablesanapplicationprogramtotestthe state of
the cursor. The attributescan be usedto checkwhethercursorisopenedorclosed,foundornot
foundandalso findrowcount.
30. What are SET operators?
SET operatorsare usedwithtwoor more queriesandthose operatorsare Union,UnionAll,Intersect
and Minus.
31. How can we delete duplicate rowsin a table?
Duplicate rowsinthe table can be deletedbyusingROWID.
32. What are the attributesof Cursor?
Attributesof Cursorare
1. %FOUND
ReturnsNULL if cursor is openandfetchhas not beenexecuted
ReturnsTRUE if the fetchof cursor isexecutedsuccessfully.
ReturnsFalse if norows are returned.
 %NOTFOUND
ReturnsNULL if cursor is openandfetchhas not beenexecuted
ReturnsFalse if fetchhasbeenexecuted
ReturnsTrue if norow was returned
 %ISOPEN
Returns true if the cursoris open
Returnsfalse if the cursoris closed
 %ROWCOUNT
Returnsthe numberof rows fetched.Ithasto be iteratedthroughentire cursortogive exactreal
count.
33. Can we store picturesin the database and if so,how it can be done?
Yes,we can store picturesinthe database byLong Raw Data type.Thisdatatype isusedto store
binarydata for 2 gigabytesof length.Butthe table can have onlyonLong Raw data type.
34. What is an integrityconstraint?
An integrityconstraintisadeclarationdefinedabusinessrule foratable column.Integrity
constraintsare usedto ensure accuracy andconsistencyof data ina database.There are types –
DomainIntegrity,Referential IntegrityandDomainIntegrity.
35. What is an ALERT?
An alertis a windowwhichappearsinthe centerof the screenoverlayingaportionof the current
display.
36. What is hash cluster?
Hash Clusterisa technique usedtostore the table forfasterretrieval.Applyhashvalue onthe table
to retrieve the rowsfromthe table.
37. What are the various constraints usedin Oracle?
Followingare constraintsused:
 NULL – It is toindicate thatparticularcolumncan containNULL values
 NOT NULL – It isto indicate thatparticularcolumncannotcontainNULL values
 CHECK – Validate thatvaluesinthe givencolumntomeetthe specificcriteria
 DEFAULT – It isto indicate the value isassignedtodefaultvalue
38. What is difference betweenSUBSTRand INSTR?
SUBSTR returnsspecificportionof astringand INSTR providescharacterpositioninwhichapattern
isfoundina string.
SUBSTR returnsstringwhereasINSTRreturnsnumeric.
39. What is the parameter mode that can be passed to a procedure?
IN,OUT and INOUTare the modesof parametersthat can be passedto a procedure.
40. What are the differentOracle Database objects?
There are differentdataobjectsinOracle –
 Tables – set of elementsorganizedinvertical andhorizontal
 Views –Virtual table derivedfromone ormore tables
 Indexes –Performance tuningmethodforprocessingthe records
 Synonyms – Aliasname fortables
 Sequences –Multiple usersgenerate unique numbers
 Tablespaces –Logical storage unitin Oracle
41. What are the differencesbetweenLOVand List Item?
LOV ispropertywhereaslistitemsare consideredas singleitem.Listof itemsissettobe a collection
of listof items.A listitemcanhave onlyone column,LOV can have one or more columns.
42. What are privilegesandGrants?
Privilegesare the rightstoexecute SQLstatements –meansRightto connect and connect.Grants
are giventothe objectso that objectscanbe accessedaccordingly.Grantscan be providedbythe
owneror creator of an object.
43. What is the difference between$ORACLE_BASE and $ORACLE_HOME?
Oracle base is the mainor root directoryof an oracle whereasORACLE_HOME islocatedbeneath
base folderinwhichall oracle productsreside.
44. What is the fastest querymethod to fetch data from the table?
Row can be fetchedfromtable byusingROWID.UsingROW ID isthe fastestquery methodtofetch
data fromthe table.
45. What is the maximum numberof triggers that can be appliedto a single table?
12 is the maximumnumberof triggersthatcan be appliedtoa single table.
46. How to displayrow numbers with the records?
Displayrow numberswiththe recordsnumbers –
Select row num, <fieldnames> fr
Selectrownum,<fieldnames>fromtable;
Thisquerywill displayrownumbersandthe fieldvaluesfromthe giventable.
47. How can we viewlast record added to a table?
Last record can be addedto a table and thiscan be done by –
Select * from(select * fromemp
Select* from(select*from employeesorderbyrownumdesc) where rownum<2;
48. What is the data type of DUAL table?
The DUAL table isa one-columntable presentinoracle database. The table hasasingle
VARCHAR2(1) columncalledDUMMY whichhas a value of ‘X’.
49. What is difference betweenCartesianJoinand Cross Join?
There are nodifferencesbetweenthe join.CartesianandCrossjoinsare same.Crossjoingives
cartesianproductof twotables – Rowsfrom firsttable ismultipliedwithanothertable whichis
calledcartesianproduct.
Crossjoinwithoutwhere clause givesCartesianproduct.
50. How to displayemployee recordswho getsmore salary than the average salary in the
department?
Thiscan be done bythisquery –
Select * fromemployee w here s
Select* fromemployee where salary>(selectavg(salary)fromdept,employee where dept.deptno
= employee.deptno;
Ad

More Related Content

What's hot (19)

Lecture11 standard template-library
Lecture11 standard template-libraryLecture11 standard template-library
Lecture11 standard template-library
Hariz Mustafa
 
Introduction java programming
Introduction java programmingIntroduction java programming
Introduction java programming
Nanthini Kempaiyan
 
Introduction on Data Structures
Introduction on Data StructuresIntroduction on Data Structures
Introduction on Data Structures
Nanthini Kempaiyan
 
Java Collections
Java  Collections Java  Collections
Java Collections
Kongu Engineering College, Perundurai, Erode
 
Oops
OopsOops
Oops
Somdatta Kumar
 
Beginning linq
Beginning linqBeginning linq
Beginning linq
Shikha Gupta
 
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Subhajit Sahu
 
2 a stacks
2 a stacks2 a stacks
2 a stacks
Nguync91368
 
Java collections
Java collectionsJava collections
Java collections
Amar Kutwal
 
08 ds and algorithm session_11
08 ds and algorithm session_1108 ds and algorithm session_11
08 ds and algorithm session_11
Niit Care
 
Collections framework
Collections frameworkCollections framework
Collections framework
Anand Buddarapu
 
2 b queues
2 b queues2 b queues
2 b queues
Nguync91368
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
Drishti Bhalla
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
Riccardo Cardin
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
CPD INDIA
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
Surendar Meesala
 
Lecture05 operator overloading-and_exception_handling
Lecture05 operator overloading-and_exception_handlingLecture05 operator overloading-and_exception_handling
Lecture05 operator overloading-and_exception_handling
Hariz Mustafa
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
Minal Maniar
 
Java Collections Tutorials
Java Collections TutorialsJava Collections Tutorials
Java Collections Tutorials
Prof. Erwin Globio
 
Lecture11 standard template-library
Lecture11 standard template-libraryLecture11 standard template-library
Lecture11 standard template-library
Hariz Mustafa
 
Introduction on Data Structures
Introduction on Data StructuresIntroduction on Data Structures
Introduction on Data Structures
Nanthini Kempaiyan
 
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Linked Lists: The Role of Locking : The Art of Multiprocessor Programming : N...
Subhajit Sahu
 
Java collections
Java collectionsJava collections
Java collections
Amar Kutwal
 
08 ds and algorithm session_11
08 ds and algorithm session_1108 ds and algorithm session_11
08 ds and algorithm session_11
Niit Care
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
Drishti Bhalla
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
Riccardo Cardin
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
CPD INDIA
 
Lecture05 operator overloading-and_exception_handling
Lecture05 operator overloading-and_exception_handlingLecture05 operator overloading-and_exception_handling
Lecture05 operator overloading-and_exception_handling
Hariz Mustafa
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
Minal Maniar
 

Similar to Top 50 oracle interview questions and answers (20)

SQL Interview Questions For Experienced
SQL Interview Questions For ExperiencedSQL Interview Questions For Experienced
SQL Interview Questions For Experienced
zynofustechnology
 
Ora faq
Ora faqOra faq
Ora faq
vishpoola
 
Ora faq
Ora faqOra faq
Ora faq
vishpoola
 
Viva voce
Viva voceViva voce
Viva voce
Sadhana Sreekanth
 
C
CC
C
Neha Bansal
 
C language 100 questions answers
C language 100 questions answersC language 100 questions answers
C language 100 questions answers
sakshitiwari631430
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
Top 50 SQL Interview Questions and Answer.pdf
Top 50 SQL Interview Questions and Answer.pdfTop 50 SQL Interview Questions and Answer.pdf
Top 50 SQL Interview Questions and Answer.pdf
Rajkumar751652
 
Informatica interview questions
Informatica interview questionsInformatica interview questions
Informatica interview questions
marukonda
 
Unit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptxUnit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptx
svasuki0708
 
Application sql issues_and_tuning
Application sql issues_and_tuningApplication sql issues_and_tuning
Application sql issues_and_tuning
Anil Pandey
 
Java faq's
Java faq'sJava faq's
Java faq's
Swathi Pothula
 
C faqs interview questions placement paper 2013
C faqs interview questions placement paper 2013C faqs interview questions placement paper 2013
C faqs interview questions placement paper 2013
srikanthreddy004
 
Intervies
InterviesIntervies
Intervies
roopa manoharan
 
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Simplilearn
 
MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
DubsmashTamizhan
 
Javainterview
JavainterviewJavainterview
Javainterview
Amarjit03
 
Sql wksht-7
Sql wksht-7Sql wksht-7
Sql wksht-7
Mukesh Tekwani
 
Oracle interview questions
Oracle interview questionsOracle interview questions
Oracle interview questions
barbie0909
 
Best Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview QuestionsBest Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview Questions
Ashwani Pandey
 
SQL Interview Questions For Experienced
SQL Interview Questions For ExperiencedSQL Interview Questions For Experienced
SQL Interview Questions For Experienced
zynofustechnology
 
C language 100 questions answers
C language 100 questions answersC language 100 questions answers
C language 100 questions answers
sakshitiwari631430
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
Top 50 SQL Interview Questions and Answer.pdf
Top 50 SQL Interview Questions and Answer.pdfTop 50 SQL Interview Questions and Answer.pdf
Top 50 SQL Interview Questions and Answer.pdf
Rajkumar751652
 
Informatica interview questions
Informatica interview questionsInformatica interview questions
Informatica interview questions
marukonda
 
Unit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptxUnit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptx
svasuki0708
 
Application sql issues_and_tuning
Application sql issues_and_tuningApplication sql issues_and_tuning
Application sql issues_and_tuning
Anil Pandey
 
C faqs interview questions placement paper 2013
C faqs interview questions placement paper 2013C faqs interview questions placement paper 2013
C faqs interview questions placement paper 2013
srikanthreddy004
 
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Simplilearn
 
Javainterview
JavainterviewJavainterview
Javainterview
Amarjit03
 
Oracle interview questions
Oracle interview questionsOracle interview questions
Oracle interview questions
barbie0909
 
Best Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview QuestionsBest Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview Questions
Ashwani Pandey
 
Ad

Recently uploaded (20)

Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Ad

Top 50 oracle interview questions and answers

  • 1. Top 50 Oracle InterviewQuestionsand Answers 1. Difference betweenvarcharand varchar2 data types? Varchar can store upto 2000 bytesandvarchar2 can store upto4000 bytes.Varcharwill occupy space for NULL valuesandVarchar2 will notoccupyany space.Both are differedwithrespect to space. 2. In which language Oracle has beendeveloped? Oracle has beendevelopedusingCLanguage. 3. Whatis RAW datatype? RAW datatype isusedto store valuesinbinarydataformat.The maximumsize foraraw ina table in 32767 bytes. 4. Whatis the use of NVL function? The NVL functionisusedtoreplace NULL valueswithanotherorgivenvalue.Exampleis – NVL(Value,replacevalue) 5. Whetherany commands are usedfor Months calculation?If so, What are they? In Oracle,months_betweenfunctionisusedtofindnumberof monthsbetweenthe givendates. Example is – Months_between(Date1,Date 2) 6. Whatare nestedtables? Nestedtable isadata type inOracle whichis usedtosupportcolumnscontainingmulti valued attributes.Italsoholdentire subtable. 7. Whatis COALESCE function? COALESCEfunctionisusedto returnthe value whichissetto be not null inthe list.If all valuesinthe listare null,thenthe coalesce functionwill returnNULL. Coalesce(value1,value2,value3,…) 8. Whatis BLOB datatype? A BLOB data type isa varyinglengthbinarystringwhichisusedtostore twogigabytesmemory. Lengthshouldbe specifiedinBytesforBLOB. 9. How do we representcommentsin Oracle? CommentsinOracle can be representedintwoways – 1. Two dashes(–) beforebeginningof the line –Single statement 2. /*—— */ is usedtorepresentitas commentsforblockof statement 10. What is DML? Data ManipulationLanguage (DML) isusedto access andmanipulate datainthe existing objects. DML statementsare insert,select,update anddeleteanditwon’timplicitlycommitthe currenttransaction. 11. What is the difference betweenTRANSLATEand REPLACE? Translate isusedfor characterby character substitutionandReplace isusedsubstituteasingle character witha word.
  • 2. 12. How do we display rows from the table without duplicates? Duplicate rowscan be removedbyusingthe keywordDISTINCTinthe selectstatement. 13. What is the usage of Merge Statement? Merge statementisusedto selectrowsfromone or more data source for updatingandinsertion intoa table or a view.Itisusedtocombine multipleoperations. 14. What is NULL value in oracle? NULL value representsmissingorunknowndata.Thisisusedas a place holderorrepresenteditinas defaultentrytoindicate thatthere isnoactual data present. 15. What is USING Clause and give example? The USING clause isusedto specifywiththe columntotestfor equalitywhentwotablesare joined. [sql]Select*fromemployeejoinsalaryusingemployeeID[/sql] Employee tablesjoinwiththe Salarytableswiththe EmployeeID. 16. What is keypreservedtable? A table issetto be keypreservedtable if everykeyof the table canalsobe the keyof the resultof the join. It guaranteestoreturnonlyone copyof eachrow fromthe base table. 17. What is WITH CHECK OPTION? The WITH CHECK optionclause specifieschecklevel tobe done inDML statements.Itisusedto preventchangestoa viewthatwouldproduce resultsthatare not includedinthe subquery. 18. What is the use of Aggregate functionsin Oracle? Aggregate functionisafunctionwhere valuesof multiple rowsorrecordsare joinedtogethertoget a single value output.Commonaggregate functionsare –  Average  Count  Sum 19. What do you mean by GROUPBY Clause? A GROUP BY clause canbe usedinselectstatementwhere itwill collectdataacrossmultiple records and groupthe resultsbyone or more columns. 20. What is a sub query and what are the differenttypesof subqueries? SubQueryis alsocalledasNestedQueryorInnerQuerywhichisusedto get data frommultiple tables.A subqueryis addedinthe where clause of the mainquery.
  • 3. There are twodifferenttypesof subqueries:  Correlatedsubquery A Correlated subquerycannotbe as independentquerybutcanreference columninatable listedin the from listof the outerquery.  Non-Correlatedsubquery Thiscan be evaluatedasif itwere an independentquery.Resultsof the subqueryare submittedto the mainqueryor parentquery. 21. What is cross join? Crossjoinis definedasthe Cartesianproductof recordsfrom the tablespresentinthe join.Cross joinwill produce resultwhichcombineseachrow fromthe firsttable withthe eachrow fromthe secondtable. 22. What are temporal data types in Oracle? Oracle providesfollowingtemporaldatatypes:  Date Data Type – Differentformatsof Dates  TimeStampDataType – Differentformatsof Time Stamp  Interval DataType – Interval betweendatesandtime 23. How do we create privilegesinOracle? A privilegeisnothingbutrighttoexecute anSQL queryorto access anotheruserobject.Privilege can be givenassystemprivilege oruserprivilege. [sql]GRANTuser1TOuser2 WITH MANAGER OPTION;[/sql] 24. What is VArray? VArrayisan oracle data type usedtohave columnscontainingmultivaluedattributesanditcanhold boundedarrayof values. 25. How do we get fielddetailsofa table? Describe <Table_Name>isusedtogetthe fielddetailsof aspecifiedtable. 26. What is the difference betweenrename andalias? Rename isa permanentname giventoa table ora columnwhereasAliasisatemporaryname given to a table or column.Rename isnothingbutreplacementof name andAliasisan alternate name of the table or column.
  • 4. 27. What is a View? Viewisa logical table whichbasedonone ormore tablesor views. The tablesuponwhichthe view isbasedare calledBase Tablesandit doesn’tcontaindata. 28. What is a cursor variable? A cursor variable isassociatedwith differentstatementswhichcanholddifferentvaluesatruntime. A cursor variable isakindof reference type. 29. What are cursor attributes? Each cursor in Oracle has setof attributeswhichenablesanapplicationprogramtotestthe state of the cursor. The attributescan be usedto checkwhethercursorisopenedorclosed,foundornot foundandalso findrowcount. 30. What are SET operators? SET operatorsare usedwithtwoor more queriesandthose operatorsare Union,UnionAll,Intersect and Minus. 31. How can we delete duplicate rowsin a table? Duplicate rowsinthe table can be deletedbyusingROWID. 32. What are the attributesof Cursor? Attributesof Cursorare 1. %FOUND ReturnsNULL if cursor is openandfetchhas not beenexecuted ReturnsTRUE if the fetchof cursor isexecutedsuccessfully. ReturnsFalse if norows are returned.  %NOTFOUND ReturnsNULL if cursor is openandfetchhas not beenexecuted ReturnsFalse if fetchhasbeenexecuted ReturnsTrue if norow was returned  %ISOPEN Returns true if the cursoris open Returnsfalse if the cursoris closed
  • 5.  %ROWCOUNT Returnsthe numberof rows fetched.Ithasto be iteratedthroughentire cursortogive exactreal count. 33. Can we store picturesin the database and if so,how it can be done? Yes,we can store picturesinthe database byLong Raw Data type.Thisdatatype isusedto store binarydata for 2 gigabytesof length.Butthe table can have onlyonLong Raw data type. 34. What is an integrityconstraint? An integrityconstraintisadeclarationdefinedabusinessrule foratable column.Integrity constraintsare usedto ensure accuracy andconsistencyof data ina database.There are types – DomainIntegrity,Referential IntegrityandDomainIntegrity. 35. What is an ALERT? An alertis a windowwhichappearsinthe centerof the screenoverlayingaportionof the current display. 36. What is hash cluster? Hash Clusterisa technique usedtostore the table forfasterretrieval.Applyhashvalue onthe table to retrieve the rowsfromthe table. 37. What are the various constraints usedin Oracle? Followingare constraintsused:  NULL – It is toindicate thatparticularcolumncan containNULL values  NOT NULL – It isto indicate thatparticularcolumncannotcontainNULL values  CHECK – Validate thatvaluesinthe givencolumntomeetthe specificcriteria  DEFAULT – It isto indicate the value isassignedtodefaultvalue 38. What is difference betweenSUBSTRand INSTR? SUBSTR returnsspecificportionof astringand INSTR providescharacterpositioninwhichapattern isfoundina string. SUBSTR returnsstringwhereasINSTRreturnsnumeric. 39. What is the parameter mode that can be passed to a procedure? IN,OUT and INOUTare the modesof parametersthat can be passedto a procedure. 40. What are the differentOracle Database objects? There are differentdataobjectsinOracle –  Tables – set of elementsorganizedinvertical andhorizontal
  • 6.  Views –Virtual table derivedfromone ormore tables  Indexes –Performance tuningmethodforprocessingthe records  Synonyms – Aliasname fortables  Sequences –Multiple usersgenerate unique numbers  Tablespaces –Logical storage unitin Oracle 41. What are the differencesbetweenLOVand List Item? LOV ispropertywhereaslistitemsare consideredas singleitem.Listof itemsissettobe a collection of listof items.A listitemcanhave onlyone column,LOV can have one or more columns. 42. What are privilegesandGrants? Privilegesare the rightstoexecute SQLstatements –meansRightto connect and connect.Grants are giventothe objectso that objectscanbe accessedaccordingly.Grantscan be providedbythe owneror creator of an object. 43. What is the difference between$ORACLE_BASE and $ORACLE_HOME? Oracle base is the mainor root directoryof an oracle whereasORACLE_HOME islocatedbeneath base folderinwhichall oracle productsreside. 44. What is the fastest querymethod to fetch data from the table? Row can be fetchedfromtable byusingROWID.UsingROW ID isthe fastestquery methodtofetch data fromthe table. 45. What is the maximum numberof triggers that can be appliedto a single table? 12 is the maximumnumberof triggersthatcan be appliedtoa single table. 46. How to displayrow numbers with the records? Displayrow numberswiththe recordsnumbers – Select row num, <fieldnames> fr Selectrownum,<fieldnames>fromtable; Thisquerywill displayrownumbersandthe fieldvaluesfromthe giventable. 47. How can we viewlast record added to a table? Last record can be addedto a table and thiscan be done by –
  • 7. Select * from(select * fromemp Select* from(select*from employeesorderbyrownumdesc) where rownum<2; 48. What is the data type of DUAL table? The DUAL table isa one-columntable presentinoracle database. The table hasasingle VARCHAR2(1) columncalledDUMMY whichhas a value of ‘X’. 49. What is difference betweenCartesianJoinand Cross Join? There are nodifferencesbetweenthe join.CartesianandCrossjoinsare same.Crossjoingives cartesianproductof twotables – Rowsfrom firsttable ismultipliedwithanothertable whichis calledcartesianproduct. Crossjoinwithoutwhere clause givesCartesianproduct. 50. How to displayemployee recordswho getsmore salary than the average salary in the department? Thiscan be done bythisquery – Select * fromemployee w here s Select* fromemployee where salary>(selectavg(salary)fromdept,employee where dept.deptno = employee.deptno;
  翻译: