Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 (0.5 points) If this command correctly enters a row of data into a table, which of the following would be the correct command

Question 4 (0.5 points)

If this command correctly enters a row of data into a table, which of the following would be the correct command to create that table? INSERT INTO vehicletype VALUES (1, truck, Chevrolet);

Question 4 options:

CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Question 5 (0.5 points)

(True/False). This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT); Will the following instruction add a row to the table?

INSERT INTO vehicletype (1, SUV, Honda);

Question 5 options:

True
False

Question 6 (0.5 points)

If a primary key is not a unique number for each ID entered in as part of the INSERT command, an error message will be displayed.

Question 6 options:

True
False

Question 7 (0.5 points)

(True/False). Will this SQL statement create a table called vehicletype?

INSERT INTO vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Question 7 options:

True
False

Question 8 (0.5 points)

This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT,year INTEGER);

At least 25 rows have been inserted with different types of vehicles (truck, sedan, SUV, sport) and manufacturer (Chevrolet, Ford, Toyota, etc.), and year the vehicle was manufactured. What would be the result of this command:

Select * FROM vehicletype WHERE typeofvehicle=truck ORDER BY year;

Question 8 options:

A list of all the vehicles in the database would be displayed and ordered by year manufactured.

A list of only the trucks would be displayed and those vehicles would be listed in order of the year the vehicle was manufactured.

Question 9 (0.5 points)

What is the error in this SQL statement?

CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Question 9 options:

The CREATE command is incomplete

There are too many columns designated for the table.

Question 10 (0.5 points)

This table has been created (Database Schema) and populated with values listed in RESULTS.

Database Schema

vehicletype 10 rows

Id (PK) INTEGER

typeofvehicle TEXT

manufacturer TEXT

year INTEGER

inventoryonhand INTEGER

RESULTS

Id

typeofvehicle

manufacturer

year

inventoryonhand

1

Pickup

Chevrolet

2009

12

2

SUV

Ford

2017

13

3

SUV

Toyota

2015

7

4

Sedan

Toyota

2014

8

5

Sedan

Ford

2017

10

6

Coupe

Hyundai

2010

8

7

Pickup

Honda

2015

7

8

Sedan

Honda

2017

23

9

SUV

Hyundai

2013

6

10

Pickup

Ford

2017

16

Which of the following commands would result in a value of 6 (six) being displayed?

Question 10 options:

SELECT MIN(inventoryonhand) FROM vehicletype;

SELECT MAX(inventoryonhand) FROM vehicletype;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago