solved ocp questions

Upload: nabil790

Post on 30-May-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Solved Ocp Questions

    1/9

    1.)which of the following statements are DML Statements?

    1.select2.create3.Truncate4.commit

    ans :1

    2)char datatype "hhh"=="hhh "

    what is the result?

    1.true2.false

    ans :1

    3)select distinct empid,empname from employees

    will this query execute?

    1.true2.false

    ans:1

    4)Dual table has how many colums and rows?

    1. 1 and 12. 0 and 13. 1 and 0

    4. 0 and 0

    ans : 1

    5)select empname from employess empname like 'jack%';

    what are the values given below can be returned by the query?

    1.jackson and sonjack2.jackson3.sonjack4.none fo the above

    ans :2

    6).what is the default beahaviour of order by?

    1.ascending order2.descending order

    ans:1

  • 8/9/2019 Solved Ocp Questions

    2/9

    7)Null values will appear in the top of the result when using ascendingorder by?

    1.true2.false

    ans:2

    8)Group by statement can appear after order by ?

    1.true2.false

    ans:2

    9)Column alias name can be used for where clause ?

    1.true2.false

    ans :2

    10.where clause can not appear after group by clause?

    1.true2.false

    ans:1

    11.Which of the following commands are not supported in isql *plu?

    A. ACCEPT

    B. HOSTC. EXITD. SPOOLE. STORE

    ans:all of the above

    12.what are the functions can return non-null value when called withnull value?

    A. upperB. ASCIIC. CONCATD. DECODEE. NVL

    ans:C,D,E

  • 8/9/2019 Solved Ocp Questions

    3/9

    13.select substr("the great ocp", -3) result from dual;

    A. theB. greatC. ocpD. the great

    ans: C

    14.what is ceil(-21.3) and ceil(-21.5) ?

    A. -21,-21B. -22,-21C. -22,-22D. -22,-21

    ans:A

    14.what is floor(-21.3) and floor(-21.5) ?

    A. -21,21B. -22,-21C. -22,-22D. -22,-21

    ans:c

    15.The user function is a singlerowfunction which returns the currentuser name?

    true

    false

    ans:true

    16.Trignometric function uses?

    A. radiansB. degreesC. gradientsD. both radians and degrees

    ans:A

    17.which function uses if then else logic

    A. decodeB. initcapC. collaceD. replaceE. ifelse

  • 8/9/2019 Solved Ocp Questions

    4/9

    ans :A

    18.In group functions, the exact numer of inputs is determined afterthe query is executed

    A. trueB. false

    ans:A

    19.find out the correct sequence?

    A. groupby,orderby,havingB. having,groupby,orderbyC. orderby,having,groupbyD. groupby,having,orderbyE. none of the above

    ans: D

    19.Nesting functions are not supported.

    A. trueB. false

    ans :B

    20.GROUP BY, ORDER BY can be used in WHERE clause.

    A. trueB. false

    ans:B

    21.Alias names can be used in

    A. natural join syntaxB. join using syntaxC. join on syntaxD. All of the above

    ans :c

    22.How many joins required to avod cartesian product?

    ans: n-1 joins for n tables

  • 8/9/2019 Solved Ocp Questions

    5/9

    23.Which of these are set operators?

    A. unionB. union allC. intersect

    D. minusE. all of the above

    ans :E

    24.A single row subquery may return many values.

    A. trueB. false

    ans :B

    25.select regionid,regioname as region from regions order by 1,regionsgroup by regionid;

    Will the above statement successfully execute?

    A. trueB. false

    ans:B

    26.Which statement resists the high water mark?

    A. truncateB. deleteC. dropD. none of the above

    ans :A

    27.Which statement will not end a transaction?

    A. commitB. alterC. insertD. create

    ans:C

    28.Long datatype can appear in

  • 8/9/2019 Solved Ocp Questions

    6/9

    A. order byB. whereC. group byD. none of the above

    ans:D

    29.Which datatype stores data outside oracle?

    A. long rawB. blobC. bfileD. clob

    ans:C

    30.ALTER statement can rename a column

    A. trueB. false

    ans:B

    31.Drop table command will

    A. drop indexB. drop triggersC. drop constraintsD. all of the above

    ans: D

    32.The default constraint name begins with SYS_

    A. trueB. false

    ans:A

    33.The not null constraint can be defined in table level?

    A. trueB. false

    ans :B

  • 8/9/2019 Solved Ocp Questions

    7/9

    34.which constraint will not allow null value?

    A. checkB. uniqueC. primary

    D. not null

    ans:C,D

    35.which is not supported in select clause in a view definition?

    A. havingB. cubeC. group byD. order byE. none of the above

    ans:E (for update not supported)

    36.Rownum is not stored in the database

    A. trueB. false

    ans :A(it is assigned as each record is fetched)

    37.what are the special chars allowed in table name?

    A. %B. #C. $D. @E. &

    ans:B,C

    38.A view can be create before the creation of its base table

    A. true

    B. false

    ans:A (with force option in create view statement)

    39.what is the default value for maxvalue in decreasing sequence?

    A. -1B. 0

  • 8/9/2019 Solved Ocp Questions

    8/9

    C. 1D. nomaxvalue

    ans:A

    40.Before referencing currval nextval should be referenced

    A. trueB. false

    ans:A

    41.B tree indexes is suitable for high cardinality columns

    truefalse

    ans :A

    42.Bitmap indexes is suitable for high cardinality columns

    truefalse

    ans:B

    43.In which order objects are referenced?

    A. objects owned by current user,public synonym,private synonym

    B. objects owned by current user,private synonym,public synonymC. private synonym,public synonym,objects owned by currentuser'D. none of the above

    ans :B

    44.PL/SQL function should return a value

    A. trueB. false

    ans:A

    45.PL/SQL procedure should return a value

    A. trueB. false

  • 8/9/2019 Solved Ocp Questions

    9/9

    ans: B

    46.Grant command has implicit commit

    A. true

    B. false

    ans :A

    47.alter sequence ramharid increment by 4.4;

    Will the above statement execute?

    A. trueB. false

    ans:B

    48.