Quiz Discussion

In an employee table to include the attributes whose value always have some value which of the following constraint must be used?

Course Name: SQL -Structured Query Language

  • 1]

    Null

  • 2]

    Not null

  • 3]

    Unique

  • 4]

    Distinct

Solution
No Solution Present Yet

Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
1
Discuss

Using the ______ clause retains only one copy of such identical tuples.

  • 1]

    Null

  • 2]

    Unique

  • 3]

    Not null

  • 4]

    Distinct

Solution
2
Discuss

If the attribute phone number is included in the relation all the values need not be entered into the phone number column. This type of entry is given as

  • 1]

    0

  • 2]

    -

  • 3]

    Null

  • 4]

    Empty space

Solution
3
Discuss

The predicate in a where clause can involve Boolean operations such as and. The result of true and unknown is_______ false and unknown is _____ while unknown and unknown is _____

  • 1]

    Unknown, unknown, false

  • 2]

    True, false, unknown

  • 3]

    True, unknown, unknown

  • 4]

    Unknown, false, unknown

Solution
4
Discuss

The result of _____unknown is unknown.

  • 1]

    Xor

  • 2]

    Or

  • 3]

    And

  • 4]

    Not

Solution
5
Discuss

The primary key must be

  • 1]

    Unique

  • 2]

    Not null

  • 3]

    Both Unique and Not null

  • 4]

    Either Unique or Not null

Solution
6
Discuss

A _____ indicates an absent value that may exist but be unknown or that may not exist at all.

  • 1]

    Empty tuple

  • 2]

    New value

  • 3]

    Null value

  • 4]

    Old value

Solution
7
Discuss
SELECT name
FROM instructor
WHERE salary IS NOT NULL;
Selects
  • 1]

    Tuples with null value

  • 2]

    Tuples with no null values

  • 3]

    Tuples with any salary

  • 4]

    All of the mentioned

Solution
8
Discuss
CREATE TABLE employee (id INTEGER,name VARCHAR(20),salary NOT NULL);
INSERT INTO employee VALUES (1005,Rach,0);
INSERT INTO employee VALUES (1007,Ross, );
INSERT INTO employee VALUES (1002,Joey,335);

Some of these insert statements will produce an error. Identify the statement.

  • 1]

    Insert into employee values (1005,Rach,0)

  • 2]

    Insert into employee values (1002,Joey,335);

  • 3]

    Insert into employee values (1007,Ross, );

  • 4]

    None of the mentioned

Solution
9
Discuss

You attempt to query the database with this command:

 SELECT nvl (100 / quantity, NONE)
 FROM inventory;

Why does this statement cause an error when QUANTITY values are null?

  • 1]

    The expression attempts to divide by a null value

  • 2]

    The data types in the conversion function are incompatible

  • 3]

    The character string none should be enclosed in single quotes (‘ ‘)

  • 4]

    A null value used in an expression cannot be converted to an actual value

Solution
# Quiz