Dba Quiz 1

15 �ntrebri | Attempts: 287
Share

SettingsSettingsSettings
Database Quizzes & Trivia

.


Questions and Answers
  • 1. 

    What are INSERTED and DELETED tables in MSSQL? (describe them shortly in 1-2 rows. Romanian language can be used).

  • 2. 

    Write a query to get the department and departemt total(sum) salary from “EmployeeDetail” table.    Write a query to get Project Name assign to more then 1 employee.(note: both queries should be writen in the same text box)   

  • 3. 

    Write a query to get all employee details from above table. Get all employee details from above table whose “FirstName” ends with ‘%h’Get all employee details from above table whose “FirstName” start with ‘A’ and contain 5 letters 

  • 4. 

    Which of the following 3 SQL statements is correct?

    • A.

      SELECT Username, Password FROM Users

    • B.

      SELECT Username, Password WHERE Username = 'user1'

    • C.

      SELECT Username AND Password FROM Users

    Correct Answer
    A. SELECT Username, Password FROM Users
  • 5. 

    What is the correct order of the ">" and the "=" operators, when we want to specify greater or equal search condition? 

    • A.

      Neither of the other who

    • B.

      =>

    • C.

      >=

    Correct Answer
    C. >=
  • 6. 

    Which of the following SQL clauses is used to DELETE data from a database table?

    • A.

      DELETE

    • B.

      DROP DATA

    • C.

      REMOVE

    • D.

      CLEAR

    Correct Answer
    A. DELETE
  • 7. 

    We refer to a join as a self-join when... 

    • A.

      We are joining more than 2 tables

    • B.

      We are joining table to itself

    • C.

      We are using left and right join together

    Correct Answer
    B. We are joining table to itself
  • 8. 

    What is a primary key?

    • A.

      The primary key column is a column or combination of columns whose values can be non-unique.

    • B.

      The primary key is a column that can have NULL values.

    • C.

      The primary key is a column or combination of columns whose values uniquely identify each row in the table.

    Correct Answer
    C. The primary key is a column or combination of columns whose values uniquely identify each row in the table.
  • 9. 

    What will be the result of the following SQL statement:SELECT * FROM Table1 HAVING Column1 > 10 

    • A.

      The SQL statement will generate an error

    • B.

      The result will be empty data set

    • C.

      The result will be all rows from Table1 which have Column1 values greater than 10

    Correct Answer
    A. The SQL statement will generate an error
  • 10. 

    The table rows are also known as...

    • A.

      Fields

    • B.

      Records

    • C.

      Attributes

    Correct Answer
    B. Records
  • 11. 

    Select the full set of SQL aggregate functions

    • A.

      AVG(), COUNT(), FIRST(), LAST(), SUM()

    • B.

      AVG(), COUNT(), MAX(), MEDIAN(), MIN(), ROUND(), SUM()

    • C.

      AVG(), COUNT(), FIRST(), LAST(), MAX(), MIN(), SUM()

    • D.

      AVG(), COUNT(), MAX(), MIN(), SUM()

    • E.

      COUNT(), SUM()

    Correct Answer
    D. AVG(), COUNT(), MAX(), MIN(), SUM()
  • 12. 

    What will be the output of the following statement: SELECT LEN(CAST(LEFT(‘026-100’,3) AS INT))

    • A.

      2

    • B.

      3

    • C.

      7

    • D.

      Error will be generate

    Correct Answer
    A. 2
  • 13. 

    Select the code which shows the countries that end in A or L

    • A.

      SELECT name FROM world WHERE name LIKE 'a%' AND name LIKE 'l%'

    • B.

      SELECT name FROM world WHERE name LIKE 'a%' OR name LIKE 'l%'

    • C.

      SELECT name FROM world WHERE name LIKE '%a' AND name LIKE '%l'

    • D.

      SELECT name FROM world WHERE name LIKE '%a' OR 'l%'

    • E.

      SELECT name FROM world WHERE name LIKE '%a' OR name LIKE '%l'

    Correct Answer
    E. SELECT name FROM world WHERE name LIKE '%a' OR name LIKE '%l'
  • 14. 

    You want to find the stadium where player 'Dimitris Salpingidis' scored. Select the JOIN condition to use: 

    • A.

      Eteam JOIN game ON (id=team1)

    • B.

      Eteam JOIN game ON (id=team2)

    • C.

      Eteam JOIN goal ON (teamid=id)

    • D.

      Game JOIN goal ON (id=matchid)

    Correct Answer
    D. Game JOIN goal ON (id=matchid)
  • 15. 

    Select the statement that shows the sum of population of all countries in 'Europe' 

    • A.

      SELECT name, population FROM bbc WHERE region = 'Europe'

    • B.

      SELECT population FROM bbc WHERE region = 'Europe' SUM BY region

    • C.

      SELECT SUM(population) FROM bbc WHERE region = 'Europe'

    • D.

      SELECT SUM(population FROM bbc WHERE region = 'Europe')

    • E.

      SUM population FROM bbc WHERE region = 'Europe'

    Correct Answer
    C. SELECT SUM(population) FROM bbc WHERE region = 'Europe'

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Aug 03, 2016
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 01, 2016
    Quiz Created by
    Bogdan99999

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.