Home
Current Affairs January 2024

What is the correct answer?

4

Which of the following statement is FALSE?

A. A Primary Key cannot be NULL

B. A Foreign Key cannot be NULL

C. A Primary Key cannot be Duplicate

D. A Foreign Key can be Duplicate

Correct Answer :

B. A Foreign Key cannot be NULL


The option (B) is false, because a foreign key can be NULL or duplicate.

Related Questions

What is the correct answer?

4

What does the following statement do?

A. Finds any values that start with a and ends with o

B. Finds any values whose first character is a and third character is o

C. Both A. and B.

D. None of the above

What is the correct answer?

4

In order to insert a row directly in the table, which command is used?

A. INSERT IN

B. INSERT INSIDE

C. INSERT UNDER

D. INSERT INTO

What is the correct answer?

4

If multiple columns are used as Primary Key, it is known as

A. Unique

B. Composite

C. Foreign

D. None of the above

What is the correct answer?

4

Select the correct constraint in SQL?

A. NOT NULL

B. CHECK

C. DEFAULT

D. All of the above

What is the correct answer?

4

Which of the following statement is correct?

A. Comparison Operator has higher precedence than Conjuction Operator.

B. Identity Operator has higher precedence than Multiplication Operator.

C. Both A and B

D. None of the above

What is the correct answer?

4

Rules that are needed to be followed in SET Operators in SQL are

A. All columns must be identical in number and order.

B. There must be compatibility between data types.

C. Both A and B

D. None of the above

What is the correct answer?

4

In SQL SELECT COUNT, one needs to specify the

A. Column Name

B. Row Name

C. Table Name

D. None of the above

What is the correct answer?

4

In case of ____ data, recursive CTE is used?

A. Round

B. Hierarchal

C. Linear

D. None of the above

What is the correct answer?

4

In how many categories data types has been classified?

A. 2

B. 3

C. 4

D. 5

What is the correct answer?

4

Which of the following is not MySQL Numeric Data Type?

A. BIT(Size)

B. CHAR(Size)

C. INTEGER(Size)

D. INT(Size)

What is the correct answer?

4

What is the difference between VARCHAR and VARCHAR2?

A. VARCHAR can store upto 4000 bytes and VARCHAR2 can store upto 8000 bytes.

B. VARCHAR can store upto 2000 bytes and VARCHAR2 can store upto 4000 bytes.

C. Both VARCHAR and VARCHAR2 are similar but use of VARCHAR2 is mostly recommended.

D. There is no similarity between VARCHAR and VARCHAR2.

What is the correct answer?

4

To delete table definition and all data from the table, which statement is used?

A. DELETE

B. DROP

C. ALTER

D. None of the above

What is the correct answer?

4

Global Temp Variable is used with which sign?

A. ###

B. ####

C. #

D. ##

What is the correct answer?

4

Numbers of operand used by Binary Operators are?

A. 1

B. 2

C. 3

D. 4

What is the correct answer?

4

SQL has the disadvantage of?

A. SQL is cheap.

B. SQL interface is simple.

C. Both A and B.

D. None of the above.

What is the correct answer?

4

Which of the following is SQL Server Date and Time Data Type?

A. timestamp

B. sql_variant

C. real

D. text

What is the correct answer?

4

The numerical values of two ___ of the ___ table can be easily subtracted using SQL Subtraction Operator.

A. Rows, same

B. Columns, same

C. Rows, different

D. Columns, different

What is the correct answer?

4

What does the DELETE Statement do?

A. A new table in SQL is created using this SQL statement.

B. By deleting the stored data, this SQL statement deletes the database.

C. Columns in the SQL database can be created, deleted, or modified with this SQL statement.

D. By executing this SQL statement, you remove the table and all the information that it contains, including the structure, views, permissions, and triggers.

What is the correct answer?

4

Select the correct syntax for Multi-line Comments.

A. //*Line1

B. Line2*//

C. /*Line1

D. Line2/*

What is the correct answer?

4

Which of the following is not MySQL String Data Type?

A. TEXT(Size)

B. TINYTEXT

C. MEDIUMTEXT

D. LARGETEXT

What is the correct answer?

4

How can we prevent SQL Injection attack?

A. We should pre-define the input type, input field and length of the user data to validate the input for the user authentication.

B. Access privileges should be restricted for the users

C. Administrator accounts should not be used.

D. All of the above

What is the correct answer?

4

Which of the following is TRUE about TCL?

A. Transactions can be saved to the database and rolled back with the help of TCL commands in SQL.

B. There will be certain privileges that each user has; consequently, the data can be accessed by them using TCL.

C. Our data is stored in a table that is described by the schema, thus TCL commands deal with the schema.

D. SQL TCL commands can be used to perform any kind of retrieval or manipulation of the data present in SQL tables.

What is the correct answer?

4

At which of the following stage does SQL Injection occurs?

A. When the user is asked to logout

B. When the user is asked to input password

C. When the user is asked to input captcha

D. When the user is asked to input username

What is the correct answer?

4

What does the ROLLBACK Statement do?

A. Specify the columns of the table in this SQL statement to return distinct values.

B. Changes made in the SQL database transaction are permanently saved using this SQL statement.

C. By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.

D. An index is created in a SQL database table with this SQL statement.

What is the correct answer?

4

To add a Primary Key constraint after table is created, which clause is used?

A. UPDATE

B. ADD

C. ALTER

D. JOIN

What is the correct answer?

4

____ integrity is achieved by using a foreign key.

A. Referential Integrity

B. Domain Integrity

C. User-defined Integrity

D. Entity Integrity

What is the correct answer?

4

What is TRUE about the Active/Dynamic Online Catalog based on the relational model in the 12 Codd's Rules?

A. The primary key value, table name, and column name are characteristics that allow us to access the precise data (atomic value) logically from a relational database.

B. Null values are treated in database records according to this rule.

C. Database dictionaries represent the complete logic of all descriptive data, which must be stored online.

D. None of the above

What is the correct answer?

4

Which statement is not true?

A. SQL is rational whereas No-SQL is non-rational.

B. SQL follows BASE Model whereas No-SQL follows ACID Model.

C. SQL database are vertically scalable whereas No-SQL database are horizontally scalable.

D. No-SQL databases are preferable to store hierarchical data in comparison SQL databases.

What is the correct answer?

4

Select the correct syntax of SELECT TOP clause?

A. SELECT TOP name

B. SELECT TOP column

C. SELECT TOP FROM

D. SELECT TOP Number

What is the correct answer?

4

Which syntax is correct for RENAME DATABASE in MySQL?

A. RENAME old_database_name TO new_database_name;

B. RENAME DATABASE old_database_name TO new_database_name;

C. ALTER old_database_name MODIFY NAME = new_database_name;

D. ALTER DATABASE old_database_name MODIFY NAME = new_database_name;