A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 4CAT
Program Plan Intro
Insert values:
Inserting values comes under Data Manipulation Language (DML).
- The INSERT command in SQL is employed to add records to an existing table.
Syntax for inserting values into the table is as follows:
INSERT INTO TABLE_NAME VALUES ('DATA 1', 'DATA 2');
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
The Book table has the following columns:
ID Title Author Genre Year Price
Complete the SELECT statement to select the year and the average price of books for that
year.
SELECT *Type your code here */
FROM Book
GROUP BY Pick
The Book table has the following columns:
ID Title Author Genre Year Price
Complete the SELECT statement to select the genre and the total number of books for
that genre.
SELECT /* Type your code here */
FROM Book
GROUP BY Pick
✓
List the first name and last name of all authors. Concatenate the first and last names so that the result set has only one column. Hint: CONCAT(). For example:
+---------------+
| Full Name |
+---------------+
| Mike Lance |
| Steve Smith |
| Anne Penny |
| Ron MacDonald |
| Sylvia Parry |
| Albert Jones |
+---------------+
Chapter 6 Solutions
A Guide to SQL
Ch. 6 - Prob. 1RQCh. 6 - Which command and clause adds an individual row to...Ch. 6 - How do you add data from an existing table to...Ch. 6 - Prob. 4RQCh. 6 - Which command removes rows from a table?Ch. 6 - Which command makes updates permanent?Ch. 6 - Which command reverses updates? Which updates are...Ch. 6 - Prob. 8RQCh. 6 - What is the format of the SET clause that changes...Ch. 6 - Which command and clause adds a column to an...
Ch. 6 - Prob. 11RQCh. 6 - Which command deletes a table and all its data?Ch. 6 - Prob. 13RQCh. 6 - Prob. 1TDCh. 6 - Prob. 2TDCh. 6 - Prob. 3TDCh. 6 - Prob. 4TDCh. 6 - Prob. 5TDCh. 6 - Prob. 6TDCh. 6 - In the NONGAME table, change the category for item...Ch. 6 - Prob. 8TDCh. 6 - Prob. 9TDCh. 6 - Prob. 10TDCh. 6 - Prob. 11TDCh. 6 - Use SQL to make the following changes to the...Ch. 6 - Prob. 2CATCh. 6 - Prob. 3CATCh. 6 - Prob. 4CATCh. 6 - Prob. 5CATCh. 6 - Prob. 6CATCh. 6 - Add to the PADDLING table a new character column...Ch. 6 - Prob. 8CATCh. 6 - Prob. 9CATCh. 6 - Prob. 10CATCh. 6 - Prob. 11CATCh. 6 - Prob. 12CATCh. 6 - Use SQL to make the following changes to the...Ch. 6 - Prob. 2SCGCh. 6 - Prob. 3SCGCh. 6 - Prob. 4SCGCh. 6 - Prob. 5SCGCh. 6 - Prob. 6SCGCh. 6 - Prob. 7SCGCh. 6 - Prob. 8SCGCh. 6 - Prob. 9SCGCh. 6 - Prob. 10SCGCh. 6 - Prob. 11SCGCh. 6 - Prob. 12SCG
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Add the following row to the ADVENTURE_TRIP table: trip ID: 45; trip name: Jay Peak; Start location: Jay; state: VT; distance: 8; maximum group size: 8; type: Hiking and season: Summer. Display the contents of the ADVENTURE_TRIP table.arrow_forwardCreate a new table containing the category code and description for the categories of books sold by JustLee Books. The table should be called CATEGORY, and the columns should be CatCode and CatDesc. The CatCode column should store a maximum of 2 characters, and the CatDesc column should store a maximum of 10 characters.arrow_forwardList all information for each order item. Include an item total, which can be calculated by multiplying the Quantity and Paideach columns. Use a column alias for the calculated value to show the heading Item Total in the output.arrow_forward
- The Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name and height for only horses that have an above average height. Order the results by height (ascending). Hint: Use a subquery to find the average height.arrow_forwardhe Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name, height, and birth date for only horses that have a height between 15.0 and 16.0 (inclusive) or have a birth date on or after January 1, 2020.arrow_forwardGuided Table Build: We will be Creating a Table called Student For the 6 following questions, your submission will be the query that shows you’ve created the table conforming to the requirements. Create a Table Named Student. The first column should be named ID, and have a data type of Integer The second column should be named First_Name, and have a data type of varchar(255). The third column should be named Last_Name, and have a data type of varchar(255) The fourth column should be named DOB (short for date of birth), and have a data type of date. The firth column should be named Adv_ID (short for advisor ID), and have a data type of integer.arrow_forward
- Task 2: Insert into the LARGE_PROPERTY table the office number, address, bedrooms, floors, monthly rent, and owner number from the PROPERTY table whose square footage is greater than 1,500 square feet.arrow_forwardFile Name: Surname_MP8.m Problem Statement: Based on an automobile's model year and weight the state of New Jersey determines the car's weight class and registration fee using the following schedule: Model Year 1970 or earlier 1971 to 1979 1980 or later Weight Less than 2700 lbs 2700 to 3800 lbs More than 3800 lbs. Less than 2700 lbs 2700 to 3800 lbs More than 3800 lbs Less than 3500 lbs Weight Class 1 2 3 4 5 6 7 Registration Fee $ 16.50 25.50 46.50 27.00 30.50 52.50 19.50 3500 or more lbs 8 52.50 Using this information, write a MATLAB program (using Switch statement) that accepts the year and weight of an automobile and determines and displays the weight class and registration fee for the car.arrow_forwardThe Horse table has the following columns: ID - integer, auto increment, primary key RegisteredName - variable-length string Breed - variable-length string, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred Height - decimal number, must be between 10.0 and 20.0 BirthDate - date, must be on or after Jan 1, 2015 Insert the following data into the Horse table: RegisteredName Breed Height BirthDate Babe Quarter Horse 15.3 2015-02-10 Independence Holsteiner 16.0 2017-03-13 Ellie Saddlebred 15.0 2016-12-22 NULL Egyptian Arab 14.9 2019-10-12 Notes: Your SQL code does not display any results in Develop mode. Use Submit mode to test your code. In another lab that creates the Horse table, RegisteredName is NOT NULL. In this larrow_forward
- Country ISOCode3 Name PopDensity NIC MLT Nicaragua Malta 140 3920 LBN Lebanon 1730 Complete the UPDATE statement to change 140 to 5220 in the Country table. In the WHERE clause, identify the row to be changed using the Name column. UPDATE Your code here */ SET WHERE Note: Your answers for SET and WHERE should include the column names followed by an equals sign and the corresponding value.arrow_forwardInsert a row into the LARGE_PROPERTY table for a new property. The office number is 1, The address is 2643 Lugsi Dr., The number of bedrooms is 3, The number of floors is 2, The monthly rent is $775, The owner number is MA111. Make sure to include the period (.) in the address.arrow_forward7-Display last name of employees whose manager is KING.8-Display last name, salary and job title of all employees who earns more than the lowest salary. (Employees andJobs)9-Display all employees including King, who has no manager. Order the results by the employee number.10-Display the name and hire date of any employee hired after employee Davisarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L