Tag: technology

Questions Related to technology

Which value of parameter RD indicates that automatic and deferred restart in any form can't happen

  1. RNC

  2. R

  3. NC

  4. NR


Correct Option: C
  1. LRECL = 0 can be valid when RECFM = F

  2. LRECL=nnnnnK syntax can be valid

  3. LRECL can not be used with VSAM Files

  4. LRECL must not exceed BLKSIZE minus 4 when RECFM=VS


Correct Option: B,D
  1. LRECL=0 is valid only for RECFM=F.

  2. LRECL must not exceed BLKSIZE minus 4 for RECFM=V

  3. LRECL can not exceed BLKSIZE when RECFM=VS

  4. LRECL=nnnnnK syntax is valid.


Correct Option: B,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
Explanation:

To solve this problem, the user needs to know the SQL syntax for adding a primary key to a table using the ALTER TABLE statement.

A primary key is a column or set of columns that uniquely identifies each row in a table. It is a constraint that ensures that the values in the column(s) are unique and not null.

Now let's go through each option and explain why it is right or wrong:

A. ALTER TABLE students ADD PRIMARY KEY student_id;

This statement is incorrect because it is missing the keyword "CONSTRAINT". The correct syntax for adding a primary key constraint is "ADD CONSTRAINT".

B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY(student_id);

This statement is incorrect because it is missing the name of the constraint. All constraints should have a unique name for easy identification and management.

C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;

This statement is incorrect because the syntax is wrong. The correct syntax for adding a primary key constraint is "ADD CONSTRAINT PRIMARY KEY ()".

D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

This statement is correct. It adds a primary key constraint named "stud_id_pk" to the "students" table on the "student_id" column.

E. ALTER TABLE Students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

This statement is incorrect because it uses the "MODIFY CONSTRAINT" syntax, which is not valid for adding constraints.

Therefore, the correct answer is:

The Answer is: D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

For Which two constraints does the Oracle server implicitly create a unique index? (Choose Two)

  1. NOT NULL

  2. PRIMARY KEY

  3. FOREIGN KEY

  4. CHECK

  5. UNIQUE


Correct Option: B,E