Tag: databases

Questions Related to databases

Which three SELECT statements displays 2000 in the format "$2,000.00"? (Choose three)

  1. SELECT TO CHAR(2000, '$#,###.##')

  2. SELECT TO CHAR(2000, '$0,000.00')

  3. SELECT TO CHAR(2000, '$9,999.00')

  4. SELECT TO CHAR(2000, '$2,000.00')

  5. SELECT TO CHAR(2000, '$N,NNN.NN')

  6. SELECT TO CHAR(2000, '$9,999.99')


Correct Option: B,C,F

Which three are DATETIME data types that can be used when specifying column definitions? (Choose three.)

  1. TIMESTAMP

  2. . INTERVAL MONTH TO DAY

  3. INTERVAL DAY TO SECOND

  4. INTERVAL YEAR TO MONTH

  5. TIMESTAMP WITH DATABASE TIMEZONE


Correct Option: A,C,D
  1. ALTER TABLE students ADD PRIMARY KEY student_id;

  2. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);

  3. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student _ id);

  4. ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

  5. ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);


Correct Option: D
  1. ALTER TABLE table_name ENABLE constraint_name;

  2. ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint _ name;

  3. ALTER TABLE table_name ENABLE CONSTRAINT constraint _ name;

  4. ALTER TABLE table_name TURN ON CONSTRAINT constraint _ name;


Correct Option: C
Explanation:

To turn on an existing constraint, option C is correct:

The correct syntax to turn on an existing constraint is:

C. ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;

Option A is also a valid syntax for enabling a constraint.

Option B is incorrect because there is no "STATUS" option for the ALTER TABLE statement.

Option D is incorrect because there is no "TURN ON" option for the ALTER TABLE statement.

Therefore, the answer is: C. ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;

  1. {call swap_email_address (?, ?)}

  2. {call swap_email_address (?, ?)}

  3. {call swap_email_address (?, ?)}

  4. {call swap_email_address (?, ?)}


Correct Option: B
  1. iBATIS is a O/R Mapping tool.

  2. iBATIS is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings.

  3. iBATIS is a java development tool.

  4. iBATIS is a first class persistence framework, and will not support for custom SQL, but will support stored procedures.


Correct Option: B