# Oracle Certification Questions

Q:

Which packages contain the JDBC classes?

 A) java.sql B) java.sl C) java.jd D) java.jdbc

Explanation:

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

3 20866
Q:

A relational database developer refers to a record as

 A) a relation B) an attribute C) a criteria D) a tuple

Explanation:

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

6 10653
Q:

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

 A) LIKE only B) IN only C) NOT IN only D) IN and NOT IN

Explanation:

4 10404
Q:

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

 A) 1 B) 2 C) 3 D) 4

Explanation:

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

So to join 4 tables 3 conditions should be satisfied.

4 10134
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

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.

8 5483
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

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.

6 5353
Q:

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

 A) 8 B) 10 C) 12 D) 14

Explanation:

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

6 5166
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