Вы находитесь на странице: 1из 9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

Home

SoftwareTestingJobs

SeleniumOnlineTraining

SoftwareTestingWalkins

SoftwareTesting
AblogaboutSoftwareTesting,JavaProgramming,andSQL.
ManualTesting,Selenium,UFT,Java,andDatabaseTechnologies.

ManualTesting

YouTube

SeleniumTutorials

13K

Follow

Like 3.2K

2.4k

SeleniumVideos

UFT/QTPVideos

SQL

Java

TestingResumes

Videos

SoftwareTestingGuide

SQLInterviewQuestionsandAnswers
8:53PM

GCREDDY

NOCOMMENTS

SQLInterviewQuestions

Share

1)WhatisRDBMS?
RelationalDataBaseManagementSystems(RDBMS)that
maintainsdatarecordsandindicesintables.Relationshipsmay
becreatedandmaintainedacrossandamongthedataand
tables.
2)WhatisSQL?

SQLstandsfor'StructuredQueryLanguage',developedbyIBM
in1970s

3)WhatisSELECTstatement?

TheSELECTstatementletsyouselectasetofvaluesfroma
tableinadatabase.Thevaluesselectedfromthedatabasetable
woulddependonthevariousconditionsthatarespecifiedinthe
SQLquery.

4)Whatisnormalization?

SeleniumOnlineTraining
SoftwareTestLifeCycle
SoftwareTestingTutorial
forBeginners
SoftwareTestingAsA
Career
SoftwareTestingBasics
DomainKnowledge
TestingDocuments

SQLFAQ
DatabaseTestingFAQ
SoftwareQAFAQ
WebTestingFAQ
UFT/QTPFAQ

Search
TestingWalkinJobs
SeleniumOnlineTraining
SoftwareTestingJobs
SoftwareTestingJobsin
Hyderabad
ManualTestingTutorials
SeleniumVideos
JavaforSelenium
SeleniumWebDriver
SeleniumQuickGuide
UFT/QTPTutorials
VBScriptforUFT/QTP
SQLTutorials
DomainKnowledgefor
Testers
SoftwareTestingFAQ
SoftwareTesting
Resumes

Databasenormalizationisadatadesignandorganization
processappliedtodatastructuresbasedonrulesthathelpbuild
relationaldatabases.

TestingLiveProject

5)WhatistheINSERTstatement?

POPULARPOSTS

BankingSoftware
Projects

TheINSERTstatementallowsustoinsertinformationintoa
database.

6)Howdoyoudeletearecordfromadatabase?

SeleniumTesterResume

UsingtheDELETEstatementwecanremoverecordsorany
particularcolumnvaluesfromadatabase.

7)Howtofindthetotalnumberofrecordsinadatabase
table?

WecanusetheCOUNTkeywordforcountingrecords,
Example:

ManualTestingInterview
Questions

SoftwareTestingFAQ
SeleniumFAQ

WalkinJobs

SELECTCOUNT(*)FROMEmp
8)WhatisView?

SeleniumStepbyStep
Videos
SoftwareTestingWalkin
Jobs

ManualTesting
SQLInterviewQuestions
andAnswers
SoftwareTestingResume
SoftwareTestingFresher
CV
SoftwareTesterJob
Responsibilities
ManualTestingInterview
Questions2

Asimpleviewcanbethoughtofasasubsetofatable.Itcanbe
usedforretrievingdata,aswellasupdatingordeletingrows.
9)WhatisIndex?

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

1/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

POPULARPOSTS
LAST7DAYS
SoftwareTestingWalkin
Jobs
SQLInterviewQuestions
andAnswers
SeleniumTesterResume
InterviewsExperienceofa
SoftwareTesting
Professional
SoftwareTestingInterview
QuestionsandAnswers
JavaStepbyStepVideos
SoftwareTesterJob
Responsibilities
SoftwareTestingRealTime
InterviewQuestions
SeleniumStepbyStep
Videos
SeleniumInterview
QuestionsandAnswers

G C RE DDY
2.4k

V I E W M Y COM P LE T E
P ROF I LE

ANALYTICS
..

10)WhatisGROUPBY?
GROUPBYkeywordhasbeenaddedtoSQLbecauseaggregate
functions(likeSUM)returntheaggregateofallcolumnvalues
everytimetheyarecalled.WithouttheGROUPBYfunctionality,
findingthesumforeachindividualgroupofcolumnvalueswas
notpossible.

11)Whatisthedifferenceamong"droppingatable",
"truncatingatable"and"deletingallrecords"froma
table?

Dropping:(Tablestructure+Dataaredeleted),Invalidatesthe
dependentobjects,Dropstheindexes
Truncating:(Dataalonedeleted),Performsanautomatic
commit,Fasterthandelete
Delete:(Dataalonedeleted),Doesntperformautomaticcommit

ABOUTME

Follow

Anindexisaphysicalstructurecontainingpointerstothedata.
Indicesarecreatedinanexistingtabletolocaterowsmore
quicklyandefficiently.

12)What'sthedifferencebetweenaprimarykeyanda
uniquekey?

Bothprimarykeyanduniqueenforceuniquenessofthecolumn
onwhichtheyaredefined.Butbydefaultprimarykeycreatesa
clusteredindexonthecolumn,whereareuniquecreatesa
nonclusteredindexbydefault.
Anothermajordifferenceisthat,primarykeydoesn'tallow
NULLs,butuniquekeyallowsoneNULLonly.

13)Whataretriggers?Howtoinvokeatriggeron
demand?
Triggersarespecialkindofstoredproceduresthatgetexecuted
automaticallywhenanINSERT,UPDATEorDELETEoperation
takesplaceonatable.

BLOGARCHIVE
2016(136)
2015(220)
2014(292)
December(69)
November(5)
October(4)
September(42)
August(8)
July(35)

Triggerscan'tbeinvokedondemand.Theygettriggeredonly
whenanassociatedaction(INSERT,UPDATE,DELETE)happens
onthetableonwhichtheyaredefined.

14)Whatisajoinandexplaindifferenttypesofjoins?

Joinisusedinqueriestoexplainhowdifferenttablesarerelated.
Joinsalsoletusselectdatafromatabledependingupondata
fromanothertable.
Typesofjoins:
INNERJOINs,
OUTERJOINs,
CROSSJOINs.
Note:OUTERJOINsarefurtherclassifiedasLEFTOUTERJOINS,
RIGHTOUTERJOINSandFULLOUTERJOINS.
15)Whatisaselfjoin?
Selfjoinisjustlikeanyotherjoin,exceptthattwoinstancesof
thesametablewillbejoinedinthequery.

Aadharcardcenters
inChattisgarh
AadharCardCenters
inBihar
AadharCardCenters
inUttarPradesh
AadharCardCenters
inNelloreDistrict
AadharCardCenters
inNalgonda
AadharCardCenters
inKrishnaDistrict
AadharCardCenters
inKhammam
AadharCardCenters
inKarimnagar
AadharCardCenters
inGuntur
AadharCardCenters
inEastGodavari
AadharCardCenters
inCuddapah

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

2/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

16)Howtoimplementonetoone,onetomanyandmanytomany

AadharCardCenters
inChittoor

relationshipswhiledesigningtables?

AadharCardCenters
inAnantapur

OnetoOnerelationshipcanbeimplementedasasingletable
andrarelyastwotableswithprimaryandforeignkey
relationships.

UseCaseTemplate
StaticTesting

OnetoManyrelationshipsareimplementedbysplittingthedata
intotwotableswithprimarykeyandforeignkeyrelationships.

Softwaretesting
Guide

ManytoManyrelationshipsareimplementedusingajunction
tablewiththekeysfromboththetablesformingthecomposite
primarykeyofthejunctiontable.

SeleniumTraining

17)WhatarethePropertiesofSubQuery?

Asubquerymustbeenclosedintheparenthesis.
Asubquerymustbeputintherighthandofthecomparison
operator,and
AsubquerycannotcontainaORDERBYclause.
Aquerycancontainmorethanonesubqueries.

BRSDocument

SoftwareTestPlan
Template

SeleniumWebDriver
SeleniumTutorial
SoftwareTesting
Interview
Questions
InsuranceDomain
Knowledge

18)Whataretypesofsubqueries?

SQLInterview
Questionsand
Answers

Singlerowsubquery,wherethesubqueryreturnsonlyonerow.
Multiplerowsubquery,wherethesubqueryreturnsmultiple
rows,.and
Multiplecolumnsubquery,wherethesubqueryreturnsmultiple
columns.

SQLForTesters
TestingCertification
Questions

19)Whatarethedifferentindexconfigurationsatable
canhave?

Configuration
Management
WebTestingTutorial

Atablecanhaveoneofthefollowingindexconfigurations:

PrototypeModel

a)Noindexes
b)Aclusteredindex
c)Aclusteredindexandmanynonclusteredindexes
d)Anonclusteredindex
e)Manynonclusteredindexes

AgileDevelopment
Model
TestDesign
Techniques
DatabaseTesting

20)WhatisthedifferencebetweenaLocalandaGlobal
temporarytable?

Alocaltemporarytableexistsonlyforthedurationofa
connectionor,ifdefinedinsideacompoundstatement,forthe
durationofthecompoundstatement.
Aglobaltemporarytableremainsinthedatabasepermanently,
buttherowsexistonlywithinagivenconnection.When
connectionisclosed,thedataintheglobaltemporarytable
disappears.However,thetabledefinitionremainswiththe
databaseforaccesswhendatabaseisopenednexttime.

Software
DevelopmentLife
Cycle
SoftwareTesting
Standards
AnOverviewon
ComputerSoftware
June(14)
May(7)
April(24)

21)Whataretheadvantagesanddisadvantagesof
primarykey?

March(18)
February(15)

PrimarykeyAdvantage:
1)Itisauniquekeyonwhichalltheothercandidatekeysare
functionallydependent.
PrimarykeyDisadvantage:
1)Therecanbemorethanonekeysonwhichalltheother
attributesaredependenton.
22)WhatisaNULLvalue?
ANULLvaluetakesuponebyteofstorageandindicatesthata
http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

January(51)
2013(730)
2012(139)
2011(53)
2010(138)

....

3/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

valueisnotpresentasopposedtoaspaceorzerovalue.
23)CanPrimarykeyisaForeignKeyonthesametable?
Yes,PrimarykeyisaForeignKeyonthesametable.
24)WhataretheSQLComparisonKeywords?

Thereareothercomparisonkeywordsavailableinsqlwhichare
usedtoenhancethesearchcapabilitiesofasqlquery.
Theyare"IN","BETWEEN...AND","ISNULL","LIKE".
25)Whatarethewildcardsusedforpatternmatching?
Wildcardsusedforpatternmatchingare:
_forsinglecharactersubstitutionand%formulticharacter
substitution.
26)Whatareuserdefineddatatypesandwhenyou
shouldgoforthem?

UserdefineddatatypesletsyouextendthebaseSQLServer
datatypesbyprovidingadescriptivename,andformattothe
database.
Forexample,inyourdatabase,thereisacolumncalled
Flight_Numwhichappearsinmanytables.Inallthesetablesit
shouldbevarchar(8).Inthiscaseyoucouldcreateauserdefined
datatypecalledFlight_num_typeofvarchar(8)anduseitacross
allyourtables.
27)WhatdoesDatabaseObjectmeans?
Adatabaseobjectinarelationaldatabaseisadatastructure
usedtoeitherstoreorreferencedata.Themostcommonobject
thatmostpeopleinteractwithisthetable.Otherobjectsare
indexes,storedprocedures,sequences,viewsandmanymore.

Whenadatabaseobjectiscreated,anewobjecttypecannotbe
createdbecauseallthevariousobjecttypescreatedare
restrictedbytheverynature,orsourcecode,oftherelational
databasemodelbeingused,suchasOracle,SQLServeror
Access.Whatisbeingcreatedisinstancesoftheobjects,suchas
anewtable,anindexonthattableoraviewonthesametable.

28)WhatisDatabaseTrigger?

Adatabasetriggerisstoredcodethatisexecutedimmediately
afterapredefinedevent.Itisusedtoensurethecoordinated
performanceofrelatedactions.Althoughimplementationvaries,
allmajorrelationaldatabasessupporttriggers.
29)WhatisSQL*Plus?
SQL*PlusisacommandlinetoolproprietarytoOracle.Youcan
sendSQLqueriestotheserverusingthetool.Itcanalsohelp
youformattheresultofaquery.
30)WhatisTSQL?
TSQListheproceduralprogramminglanguagebuiltintoSQL
ServerRDBMS.
31)WhatisPL/SQL?

PL/SQLisacombinationofSQLalongwiththeprocedural
featuresofprogramminglanguages.ItwasdevelopedbyOracle
Corporationintheearly90stoenhancethecapabilitiesofSQL.

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

4/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

32)WhatisthedifferencebetweenSQLandPL/SQL?

SQLisaquerylanguagethatallowsustouseasinglequeryor
executeasingleinsert/update/deletecommands,SQLdoesnt
supportprogrammingfeatureslikeConditionalandLoop
Statements.
PLSQLisOracle's"ProgrammingLanguage"SQL,whichallows
ustowriteafullprogram(loops,conditions,variables,etc.)to
accomplishmultipleselects/inserts/updates/deletes.
33)WhatisthedifferencebetweenSQLandSQLServer?

SQLisStructuredQueryLanguageusedtocommunicatewith
databases,whereasSQLServerisRelationalDatabase
ManagementSystemfromMicrosoft?
34)WhatistheDifferencebetweenSQLandMySQL?

SQLisStructuredQueryLanguageusedtocommunicatewith
databases,whereasMySQLisanOpenSourceRelational
DatabaseManagementSystemlikeOracle,SQLServerand
Sybaseetc
35)WhatisNormalization?

Normalizationistheprocessofefficientlyorganizingdataina
database.
36)WhySQLknowledgeisrequiredforSoftwareTesters?

SQLknowledgeisrequiredforSoftwareTesterinordertoVerify:
i)DataIntegrity,
ii)Dataconsistency,
iii)DataManipulations(Add/Edit/Delete)
iv)DataBackupandRecovery,
v)DataComparison,
EtcOperations
37)Whatarethe3importantrolesinDatabaseare?
i)Databasedevelopers
ii)DatabaseTesters
iii)DatabaseAdministrators

38)WhatisDataIntegrity?
Dataintegrityreferstotheoverallcompleteness,accuracyand
consistencyofdata.
39)WhatisDatabackupandRecovery?
40)WhatisDataComparison?
ComparingFrontenddatawithBackendData,
Comparingonedataresourcewithanother(Ex:Databasedata
withExcelfiledata)
Comparingcolumnsfromtwodifferenttablesetc...
41)WhatareAdvantagesofSQL?

i)SQLQueriescanbeusedtoretrievelargeamountsof
recordsfromadatabasequicklyandefficiently.
ii)SQLisusedtoviewthedatawithoutstoringthedatainto
theobject.
iii)SQLjoinstwoormoretablesandshowitasoneobjectto
http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

5/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

user.
iv)SQLdatabasesuselongestablishedstandard,whichis
beingadoptedbyANSI&ampISO.NonSQLdatabasesdonot
adheretoanyclearstandard.
v)UsingstandardSQLitiseasiertomanagedatabasesystems
withouthavingtowritesubstantialamountofcode.
vi)SQLrestrictstheaccessofatablesothatnobodycaninsert
therowsintothetable.
42)WhatareDisadvantagesofSQL?
i)InterfacinganSQLdatabaseismorecomplexthanaddinga
fewlinesofcode.
ii)Whentableisdroppedviewbecomesinactive.Itdependson
thetableobjects.
iii)AlthoughSQLdatabasesconformtoANSI&ampISO
standards,somedatabasesgoforproprietaryextensionsto
standardSQLtoensurevendorlockin.
iv)Itisanobjectsoitoccupiesspace.
43)WhatistheSQLstatementforextractingdatafroma
database?

SELECT
44)WhatistheSQLstatementforupdatingdataina
database?

UPDATE
45)WhatistheSQLstatementforinsertingnewdataina
database?

INSERTINTO
46)WhatistheSQLstatementforreturningonlydifferent
values?

SELECTDISTINCT

47)WhichSQLkeywordisusedtosorttheresultset?

ORDERBY
48)WhataretheimportantSQLbuiltinFunctions?

a)AVG()Returnstheaveragevalue
b)COUNT()Returnsthenumberofrows
c)FIRST()Returnsthefirstvalue
d)LAST()Returnsthelastvalue
e)MAX()Returnsthelargestvalue
f)MIN()Returnsthesmallestvalue
g)SUM()Returnsthesum
h)UCASE()Convertsavaluetouppercase
i)LCASE()Convertsavaluetolowercase
j)MID()Extractcharactersfromastringornumber
k)LEN()Returnsthelengthofatextfield
l)ROUND()Roundsanumericfieldtothenumberofdecimals
specified
m)NOW()Returnsthecurrentsystemdateandtime
n)FORMAT()Formatshowafieldistobedisplayed

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

6/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

49)WhataretheimportantclausesinSQL?

Where,
Top,
OrderBy,
GroupBy,
Having,
Union,
Between,
Joinetc
50)Howcanyoureturnthenumberofrecordsinatable
usingSQL?

SELECTCOUNT(*)FROMTableName
51)WhatisROWID?
ROWIDisapseudocolumnattachedtoeachrowofatable.Itis
18characterslong,blockno,rownumberarethecomponentsof
ROWID.
52)Whataredefaults?Isthereacolumntowhicha
defaultcan'tbebound?
Adefaultisavaluethatwillbeusedbyacolumn,ifnovalueis
suppliedtothatcolumnwhileinsertingdata.IDENTITYcolumns
andtimestampcolumnscan'thavedefaultsboundtothem.
53)WhatistheadvantageofforeignkeyinSQL?

Itallowsreferencinganothertableusingtheprimarykeyforthe
othertable.
54)Whatisdenormalizationanddifferencebetween
normalization?

Denormalizationistheprocessofattemptingtooptimizethe
performanceofadatabasebyaddingredundantdataorby
groupingdata.
Normalizationistheprocessofdecomposingarelationwith
anomaliesintoawellstructuredrelation.
55)Whatareconstraints?

Aconstraintisbasicallyaruleassociatedwithacolumnthatthe
dataenteredintothatcolumnmustfollow.
56)WhatisNestedTrigger?

AtriggercanalsocontainINSERT,UPDATEandDELETElogic
withinitself,sowhenthetriggerisfiredbecauseofdata
modificationitcanalsocauseanotherdatamodification,thereby
firinganothertrigger.Atriggerthatcontainsdatamodification
logicwithinitselfiscalledanestedtrigger.
57)Whataretheadvantagesanddisadvantagesofview?

Advantagesofviews:

1.Viewthedatawithoutstoringthedataintotheobject.
2.Restricttheviewofatablei.e.canhidesomeofcolumnsin
thetables.
3.Jointwoormoretablesandshowitasoneobjecttouser.
4.Restricttheaccessofatablesothatnobodycaninsertthe
rowsintothetable.

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

7/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

DisadvantagesofViews:

1.CannotuseDMLoperationsonthis.
2.Whentableisdroppedviewbecomesinactive..itdependson
thetableobjects.
3.Itisanobject,soitoccupiesspace.
58)WhatisaUNIQUEKEY?

AUNIQUEKEYisoneormorecolumnsthatmustbeuniquefor
eachrowofthetable.
59)HowcanyoucallaPL/SQLprocedurefromSQL?

WecancallbyusingoftheEXECUTE(shortformEXEC)
command.
60)Canoneselectarandomcollectionofrowsfroma
table?

Yes.UsingSAMPLEclause.
Example:
SELECT*FROMTableNameSAMPLE(10)
10%ofrowsselectedrandomlywillbereturned.
61)DescribehowNULLsworkinSQL?

TheNULLishowSQLhandlesmissingvalues.Arithmetic
operationwithNULLinSQLwillreturnaNULL.
62)WhatisthehighestvaluethatcanbestoredinaBYTE
datafield?

ThehighestvaluethatcanbestoredinaBYTEfieldis255or
from128to127.ByteisasetofBitsthatrepresentasingle
character.Usuallythereare8BitsinaByte,sometimesmore,
dependingonhowthemeasurementisbeingmade.EachChar
requiresonebyteofmemoryandcanhaveavaluefrom0to255
(or0to11111111inbinary).
63)Whatisthemainroleofaprimarykeyinatable?

Themainroleofaprimarykeyinadatatableistomaintainthe
internalintegrityofadatatable.
64)Listallthepossiblevaluesthatcanbestoredina
BOOLEANdatafield?

ThereareonlytwovaluesthatcanbestoredinaBOOLEANdata
field:1(true)and0(false).
65)WhatisaSPOOL?

SPOOLcommandcreatesaprintfileofthereport.
66)WhatisCOMPUTE?

Thiscommandcontrolcomputationsonsubsetscreatedbythe
BREAKcommand.
67)WhatisaBREAK?

BREAKcommandclarifyreportsbysuppressingrepeatedvalues,
skippinglines&ampallowingforcontrolledbreakpoints.
68)WhatisaCOLUMN?

COLUMNcommanddefinescolumnheadings&ampformatdata
http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

8/9

10/20/2016

SQLInterviewQuestionsandAnswers~SoftwareTesting

values.
69)WhatisTTITLE&ampBTITLE?

TTITLE&ampBTITLEarecommandstocontrolreportheadings
&ampfooters.
70)WhatisStoredProcedure?

AstoredprocedureisanamedgroupofSQLstatementsthat
havebeenpreviouslycreatedandstoredintheserverdatabase.
Storedproceduresacceptinputparameterssothatasingle
procedurecanbeusedoverthenetworkbyseveralclientsusing
differentinputdata.Andwhentheprocedureismodified,all
clientsautomaticallygetthenewversion.Storedprocedures
reducenetworktrafficandimproveperformance.Stored
procedurescanbeusedtohelpensuretheintegrityofthe
database.
e.g.sp_helpdb,sp_renamedb,sp_dependsetc.

RelatedPosts:
SQLInterviewQuestions2
SQLForTesters
SQLGuide
DatabaseTestingInterviewQuestions
Postedin:SQLFAQ,SQLforDatabaseTesting,SQLforDevelopers,sqlfortesters,sqltutorial

+2 Recommend this on Google

NewerPost

Home

OlderPost

0comments:
PostaComment

Enteryourcomment...

Commentas:

Publish

RajuSai(Google)

Preview

Signout

Notifyme

Linkstothispost
CreateaLink

Copyright2011SoftwareTesting|PoweredbyBlogger

http://www.gcreddy.com/2014/07/sqlinterviewquestionsandanswers.html

9/9

Вам также может понравиться