NEW
Font size
WorksheetsDatabase Basics - Lecture 2
Total questions: 20
Worksheet time: 10mins
Which of the following is not a common data type in databases?
Integer
Float
Boolean
String
What does SQL stand for?
Structured Query Language
Simple Query Language
Structured Question Language
System Query Language
What is the primary key in a database table?
A field that is used for sorting data
A field that is always unique and identifies each record
A field that contains text data
A field that stores binary data
What is the primary purpose of the SQL SELECT statement?
To update records in a table
To delete records from a table
To retrieve data from a database
To insert new records into a table
Which SQL clause is used to specify the columns you want to retrieve in a SELECT statement?
WHERE
FROM
SELECT
HAVING
How many Primary keys can have in a table?
Only 1
Only 2
Depends on no of Columns
Depends on DBA
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.
Where, from
From, select
Select, from
From, where
The ________ clause is used to list the attributes desired in the result of a query.
Where
Select
From
Distinct
In the given query which of the keyword has to be inserted?
INSERT INTO employee _____ (1002,Joey,2000);
Table
Values
Relation
Field
In an INSERT INTO statement, what does the following query do:
INSERT INTO customers (name, email) VALUES ('John Doe', 'johndoe@example.com')?
Inserts a new customer with the specified name and email into the "customers" table
Updates an existing customer's email address
Deletes a customer from the "customers" table
Creates a new table named "customers"
What happens if you attempt to insert a duplicate record into a table with a unique constraint using the INSERT INTO statement?
The duplicate record is inserted without any issues.
An error is generated, and the insertion is rejected.
The duplicate record is automatically removed.
The database prompts for user confirmation.
What is the correct syntax for inserting data into a table using SQL INSERT INTO statement?
INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...)
INSERT (column1, column2, ...) INTO table_name VALUES (value1, value2, ...)
INSERT table_name SET column1=value1, column2=value2, ...
INSERT VALUES (column1, column2, ...) INTO table_name (value1, value2, ...)
What is the result of a SQL SELECT statement when you specify SELECT *?
It retrieves all columns from the specified table.
It retrieves only the primary key column.
It retrieves no columns.
It retrieves a random column.
In the database table, data types describe the kind of ___ that it can contain.
Table
Data
Number
None of the above
A database of racing includes the names of each driver, total wins and losses, and average speeds. What criterion will produce Jeff Gordon’s total winnings?
>Jeff Gordon
<Jeff Gordon
<>Jeff Gordon
=Jeff Gordon
Jennifer is creating a database for several customers. How will she list the Customer ID?
Yes/No
Number
Currency
Data
Billy is creating a database for several customers. How will he record whether or not they have a credit card?
Yes/No
Number
Text
Currency
Robert needs to create a database of all his friends. In a table, is what last name considered?
Field
Table
Record
Cell Address
What type of data is stored in the shoe size field?
Numeric
alphanumeric
yes/no
Date and time
When is a database used?
To perform searches for info on the internet
To display information in a picture form instead of words
To create and format text documents for sharing info
To store and organize large amounts of information for quick searching
