3i Infotech Papers: Sample Questions 474 - 475 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 474

» Database » MySQL

Essay Question▾

Describe in Detail

What command is used to get back the privileges offered by the GRANT command?

Explanation

Understanding of REVOKE command

Understanding of REVOKE Command

Understanding of REVOKE command

  • REVOKE command is used to get back the privileges offered by the GRANT command.

  • It takes back permission from user.

  • Removes user access rights or privileges to the database objects.

  • We can revoke any combination of SELECT, INSERT, UPDATE, DELETE, REFERENCEs, ALTER, or ALL.

SQL REVOKE Command:

REVOKE privilege_name

ON object_name

FROM {user_name|PUBLIC|role_name}

  • privilege_name:

    • Access right or privilege granted to the user.

  • object_name:

    • The name of a database object like TABLE, VIEW, STORED PROC and SEQUENCE.

  • user_name:

    • The name of the user which access right is being granted.

  • role_name:

    • A set of privileges grouped together.

Question number: 475

» Database » Oracle

MCQ▾

Question

Is it possible to modify a Datatype of a column when column contains data?

Choices

Choice (4) Response

a.

No

b.

Yes

c.

None of the above

d.

Question does not provide sufficient data or is vague

Answer

a.

Explanation

  • No, it is not always possible to modify a datatype of a column when column contains data.

  • If the table is empty or the column contains null values, we can change the column to any datatype.

  • However, we can change the datatype of a column to a compatible data type for example an INT can be changed to a FLOAT.

ALTER TABLE

  • Alter table changes column datatype or renames a column.

  • Used to add, modify, or delete columns in a table.

  • Statement is also used to rename a table.

Syntax:

ALTER TABLE table_name

ADD column_name column-defination.