Oracle Certification Questions

Q:

Which packages contain the JDBC classes?

A) java.sql B) java.sl
C) java.jd D) java.jdbc
 
Answer & Explanation Answer: A) java.sql

Explanation:

The Java packages which contain JDBC classes and interfaces is Java.SQL.

Report Error

View Answer Report Error Discuss

6 19099
Q:

A relational database developer refers to a record as

A) a relation B) an attribute
C) a criteria D) a tuple
 
Answer & Explanation Answer: D) a tuple

Explanation:

A relational database developer refers to a record as a tuple.

Report Error

View Answer Report Error Discuss

7 12554
Q:

How many joining conditions are required to join 4 tables in SQL?

A) 1 B) 2
C) 3 D) 4
 
Answer & Explanation Answer: C) 3

Explanation:

To join 'n' tables 'n-1' conditions should be satisfied.

So to join 4 tables 3 conditions should be satisfied.

Report Error

View Answer Report Error Discuss

5 10831
Q:

The SQL keyword(s) ________ is used with wildcards.

A) LIKE only B) IN only
C) NOT IN only D) IN and NOT IN
 
Answer & Explanation Answer: A) LIKE only

Explanation:
Report Error

View Answer Report Error Discuss

2 7966
Q:

In the following pieces of code, B and D will compile without any error. True or false ?

A: StringBuffer sb1 = "abcd";

B: Boolean b = new Boolean("abcd");

C: byte b = 255;

D: int x = 0x1234;

E: float fl = 1.2;

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The code segments B and D will compile without any error. A is not a valid way to construct a StringBuffer, you need to create a StringBuffer object using "new". B is a valid construction of a Boolean (any string other than "true" or "false" to the Boolean constructor will result in a Boolean with a value of "false"). C will fail to compile because the valid range for a byte is -128 to +127 (i.e., 8 bits, signed). D is correct, 0x1234 is the hexadecimal representation in java. E fails to compile because the compiler interprets 1.2 as a double being assigned to a float (down-casting), which is not valid. You either need an explicit cast, as in "(float)1.2" or "1.2f", to indicate a float.

Report Error

View Answer Workspace Report Error Discuss

7 7327
Q:

what will be the output of the following code?

class Value
{
    public int i = 15;
}
public class Test
{
    public static void main(String argv[])
    {
        Test t = new Test();
        t.first();
    }
    public void first()
    {
        int i = 5;
        Value v = new Value();
        v.i = 25;
        second(v, i);
        System.out.println(v.i);
    }
    public void second(Value v, int i)
    {
        i = 0;
        v.i = 20;
        Value val = new Value();
        v =  val;
        System.out.println(v.i + " " + i);
    }
}

A) 15 0 2 B) 15 0 0
C) 15 20 0 D) 15 0 20
 
Answer & Explanation Answer: D) 15 0 20

Explanation:
Report Error

View Answer Report Error Discuss

4 6476
Q:

Which dml command is used in conjunction with @@identity?

A) INSERT and UPDATE B) UPDATE and DELETE
C) SCOPE_IDENTITY and IDENT_CURRENT D) Commit and rollback
 
Answer & Explanation Answer: C) SCOPE_IDENTITY and IDENT_CURRENT

Explanation:

Using automatically incrementing IDENTITY columns is very popular with database developers. You don’t need to explicitly calculate unique surrogate keys when inserting new data, the IDENTITY column functionality does that for you. The IDENTITY feature also allows you to specify useful Seed and Increment properties. When you use an INSERT statement to insert data into a table with an IDENTITY column defined, SQL Server will generate a new IDENTITY value.

 

You can use the @@IDENTITY variable and the SCOPE_IDENTITY and IDENT_CURRENT functions to return the last IDENTITY value that has been generated by SQL Server. This is very useful when you need to return the key for the row that has just been inserted, back to the caller.

Report Error

View Answer Report Error Discuss

9 5960
Q:

What is the maximum number of triggers, can apply to a single table?

A) 8 B) 10
C) 12 D) 14
 
Answer & Explanation Answer: C) 12

Explanation:

Maximim number of triggers that can be applied to a single table is 12

Report Error

View Answer Report Error Discuss

7 5550