SQL Database Keys and Operators

Quiz covering SQL database keys (Primary Key, Foreign Key, Unique Key), comparison operators, and basic DML statements including SELECT, INSERT, and ORDER BY clauses

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the statement to specify the varibales in the Freq procdure

  1. VAR
  2. TABLES
  3. BY
  4. COLUMNS
Question 2 Multiple Choice (Multiple Answers)

Choose correct syntax to insert values into r4r_team table

  1. INSERT INTO r4r_team (id, username, exp) VALUES (1, ‘r4r01’, ‘2’);
  2. INSERT INTO r4r_team VALUES (1, ‘r4r01’, ‘2’);
  3. INSERT INTO r4r_team (id, username, exp) VALUE (1, ‘r4r01’, ‘2’);
  4. INSERT INTO table r4r_team (id, username, exp) VALUE (1, ‘r4r01’, ‘2’);
Question 3 Multiple Choice (Multiple Answers)

What is true for following DML SQL statement SELECT username, exp, salary FROM r4r_team ORDER BY username DESC;

  1. Used to select username,exp, salary from r4r_team which is decreasing order by username.
  2. Used to select username,exp, salary from r4r_team which is increasing order by username.
  3. Used to select username,exp, salary from r4r_team which is decreasing order by exp.
  4. none
Question 4 Multiple Choice (Multiple Answers)

Which is true for AND & OR

  1. These are Operators .Which are used to filter records based on more than one conditions.
  2. These Operators are used to join two tables.
  3. Never used in SQL
  4. None
Question 5 Multiple Choice (Multiple Answers)

Choose true option

  1. BETWEEN -->>Used for range with in values
  2. LIKE -->>Used for Search a pattern
  3. IN -->>return east one of the columns in given set of values
  4. None
Question 6 Multiple Choice (Multiple Answers)

<> and != both are same operator into SQL

  1. true.
  2. false.
  3. both are not used into SQL.
  4. Both are used assembly languages only.
Question 7 Multiple Choice (Multiple Answers)

Which is not used into SQL =,<>,> ,<,>=,<=,>>>

  1. all are used
  2. only >>> not used
  3. only <>
  4. None
Question 8 Multiple Choice (Single Answer)

What is a PK

  1. UK + Not null
  2. UK
  3. UK + null
  4. UKKKK
Question 9 Multiple Choice (Single Answer)

What is a FK

  1. FK
  2. PK
  3. UK
  4. CPK
Question 10 Multiple Choice (Single Answer)

What is a UK

  1. UK
  2. PK
  3. FK
  4. CPK