SQL Quiz

Beschreibung

This is quick quiz to test the basics of SQL
Chris Cronin
Quiz von Chris Cronin, aktualisiert more than 1 year ago
Chris Cronin
Erstellt von Chris Cronin vor etwa 9 Jahre
165
3

Zusammenfassung der Ressource

Frage 1

Frage
The SQL select statement is used to select data from tables. Which of the following is the correct syntax of retrieving all records from all columns in a table called employees?
Antworten
  • A) employees.select(all)
  • B) set select = employees
  • C) SELECT * FROM employees

Frage 2

Frage
If I am concerned about the particular order in which the results from a select statement are returned, which keywords should I use to achieve this?
Antworten
  • A) ORDER BY
  • B) SORT BY
  • C) ARRANGE BY

Frage 3

Frage
I need to retrieve related data from more than one table. Which of these would be required to link the tables when I perform a select operation?
Antworten
  • A) JOIN
  • B) CONNECT
  • C) MERGE

Frage 4

Frage
I have the data and now I need to make a table to store my data. What SQL statement would I use for this?
Antworten
  • A) SELECT statement
  • B) CREATE statement
  • C) MAKE statement

Frage 5

Frage
How can you populate a database table with data using SQL?
Antworten
  • A) By using an INSERT statement
  • B) By using a SELECT
  • C) By using an ADD statement

Frage 6

Frage
I just discovered my table needs an additional column, what should I do to make this change?
Antworten
  • A) Delete your table and recreate it
  • B) There is nothing you can do
  • C) Use the ALTER TABLE statement

Frage 7

Frage
Now that my data is corrupted I want to remove it all from the table. What should I do?
Antworten
  • A) use CLEAN
  • B) use SELECT EMPTY
  • C) use TRUNCATE

Frage 8

Frage
How about if I just want to delete the table, what should I do?
Antworten
  • A) You cannot delete tables
  • B) Use the DROP TABLE statement
  • C) Use the DELETE statement

Frage 9

Frage
How do I set a certain criteria when selecting data from my table?
Antworten
  • A) Use FILTER keyword
  • B) Use the CRITERIA keyword
  • C) Use the WHERE clause

Frage 10

Frage
Sometimes it may be difficult to test whether a column is void of data or has some non printable data. Visually they look the same, how can I verify this using SQL?
Antworten
  • A) Use IS NULL or IS NOT NULL clauses
  • B) Use = ''
  • C) There is no such thing as empty space in a table

Frage 11

Frage
Retrieving data from my table using a SELECT statement is extremely slow, how can I solve this problem?
Antworten
  • A) Break your table into several smaller ones
  • B) Upgrade you computer hardware
  • C) INDEX your table columns

Frage 12

Frage
I have noticed on occasion that I need to place a selection criteria in one statement based on indefinite information stored in another table. Is there an efficient way to go about it? If yes, what should I do?
Antworten
  • A) Use a subquery
  • B) Run the SELECT statement in a loop;
  • C) There is no efficient way

Frage 13

Frage
How do I use SQL to perform math calculations?
Antworten
  • A) Use the CALCULATE clause
  • B) Use the MATH statement
  • C) Use the SELECT statement

Frage 14

Frage
While we are still thinking about calculations, how would I find the average of values in a certain column in SQL?
Antworten
  • A) Use SELECT AVERAGE
  • B) Use AVG() built in function
  • C) You need a third party application

Frage 15

Frage
What if I need to make changes to the data in a database without affecting the table structure, what would I use?
Antworten
  • A) Data in a table cannot be edited
  • B) TRUNCATE the table and INSERT the correct data
  • C) Use the UPDATE statement
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

FLAT FILE VS RELATIONAL DATABASE
rosiejones
Midterm 2 (Chapter 5 - 13)
Yorria Raine
Database Final Exam
dbm
Databaser - Introduksjon
B K
OCR gcse computer science
Jodie Awthinre
GCSE AQA Computer Science - Definitions
James Jolliffe
Midterm 1
Yorria Raine
SQL Quiz
R M
SQL 1: Databases (Module 3)
aries cantos
Managing Digital Data Review
Shannon Anderson-Rush
GCSE AQA Computer Science - Definitions
moffat00