Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
40 views

SQL Mini Test: CREATE TABLE Celebs (Id INTEGER, Name TEXT, Age INTEGER)

This document contains an 8 question SQL mini test that assesses knowledge of basic SQL concepts and commands. It asks test takers to identify SQL statements, data types, clauses, and symbols. It also asks them to analyze code snippets to determine if they are valid SQL and what they would do. The final question asks test takers to write multiple SQL statements to create a table, insert data, update records, add a column, and select specific columns from the table.

Uploaded by

Millie Marsh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

SQL Mini Test: CREATE TABLE Celebs (Id INTEGER, Name TEXT, Age INTEGER)

This document contains an 8 question SQL mini test that assesses knowledge of basic SQL concepts and commands. It asks test takers to identify SQL statements, data types, clauses, and symbols. It also asks them to analyze code snippets to determine if they are valid SQL and what they would do. The final question asks test takers to write multiple SQL statements to create a table, insert data, update records, add a column, and select specific columns from the table.

Uploaded by

Millie Marsh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL Mini Test

Answer in full sentences and in as much detail as you can. For the multiple choice questions
you must tick the correct answer and you can only tick one answer.
1. SQL stands for?
 Standard Quality Language
 Standard Query Language
 Secure Query Language

2. What does the data type Integer mean?


_____________________________________

3. Look at the image below and label, using an arrow, the parameters and the clause.

4. Look at the code above and explain why the words CREATE TABLE are in capitals and
the rest of the code is not.

5. Look at the code below and say why you think this code would not work when
entered into SQL.
CREATE TABLE celebs (id INTEGER, name TEXT, age INTEGER)

6. What does the symbol * do in SELECT * FROM celebs?

7. Look at the table below and explain what will happen when the piece of code is
typed into SQL. Remember to be very specific and not just say what will obviously
happen.
8. On the paper attached or using computer write the SQL code that will do the
following tasks:
 Makes a table called Pupils.
 Includes the fields id, name and form
 The following data typed into the table:
1, Jenny Smith, 7S
2, Paul Kennedy, 9A
3, Jack Renshaw, 8C
 Show all the records that are in the pupil table.
 Change the form of the record with id 2 to 9S.
 Add another column to the database table and call it Age.
 Update the table so that the age for each pupil is as follows:
o id 1 the age is 12
o id 2 the age is 14
o id 3 the age is 13
 Show the name and form columns of the database table.
Question 8 Answer

You might also like