BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
Chapter 6, Problem 2TD
Textbook Problem
681 views

Insert into the NONGAME table the item number, description, number of units on hand, category, and unit price from the ITEM table for each item that is not in category GME.

Program Plan Intro

Primary key:

  • To identify each record in a table, at least there must be one data field, which should be unique.
    • That is corresponding data field of every record should be unique.
    • It is called primary key.
  • Primary key is used to identify the unique record from a collection of records.

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');

Explanation of Solution

Inserting values into the table “NONGAME” from the “ITEM” table for each item is not in category of “GME”:

INSERT INTO NONGAME SELECT ITEM_NUM, DESCRIPTION, ON_HAND, CATEGORY, PRICE FROM ITEM WHERE CATEGORY <> 'GME';

Explanation:

  • The values are inserted in the table using insert command. The values are inserted as per the condition given in the table creation...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 6 Solutions

A Guide to SQL
Show all chapter solutions
add
Ch. 6 - Which command and clause changes the...Ch. 6 - Which command deletes a table and all its data?Ch. 6 - Microsoft Access supports make-table queries. What...Ch. 6 - Use SOL to make the following changes to the TAL...Ch. 6 - Insert into the NONGAME table the item number,...Ch. 6 - In the NONGAME table, change the description of...Ch. 6 - In the NONGAME table, increase the price of each...Ch. 6 - Add the following item to the NONGAME table: item...Ch. 6 - Delete every item in the NONGAME table for which...Ch. 6 - In the NONGAME table, change the category for item...Ch. 6 - Add a column named ON_HAND_VALUE to the NONGAME...Ch. 6 - In the NONGAME table, increase the length of the...Ch. 6 - Remove the NONGAME table from the TAL Distributors...Ch. 6 - Use the Internet to find the SQL command to delete...Ch. 6 - Use SQL to make the following changes to the...Ch. 6 - Insert into the PADDLING table the trip ID, trip...Ch. 6 - For all trips located in Connecticut (CT),...Ch. 6 - Insert a new trip into the PADDLING table. The...Ch. 6 - Delete the trip in the PADDLING table with the...Ch. 6 - The distance for the Pontook Reservoir Tour trip...Ch. 6 - Add to the PADDLING table a new character column...Ch. 6 - Change the DIFFICULTY_LEVEL column in the PADDLING...Ch. 6 - Change the length of the SEASON column in the...Ch. 6 - Change the DIFFICULTY_LEVEL column in the PADDLING...Ch. 6 - Delete the PADDLING table from the database.Ch. 6 - Use the Internet to research another data type...Ch. 6 - Use SQL to make the following changes to the...Ch. 6 - Insert into the LARGE_CONDO table the location...Ch. 6 - Solmaris has increased the condo fee of each large...Ch. 6 - After increasing the condo fee of each large condo...Ch. 6 - Insert a row into the LARGE_CONDO table for a new...Ch. 6 - Delete all condos in the LARGE_CONDO table for...Ch. 6 - The condo in location 1 and unit 503 is in the...Ch. 6 - Add to the LARGE_CONDO table a new character...Ch. 6 - Change the OCCUPIED column in the LARGE_CONDO...Ch. 6 - Change the CONDO_FEE column in the LARGE_CONDO...Ch. 6 - Delete the LARGE_CONDO table from the database.Ch. 6 - Use the Internet to research another data type...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
List the two basic knurl patterns.

Precision Machining Technology (MindTap Course List)

What is a typical amperage rating for a residential building?

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

6. How would you level DFDs?

Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)

A(n) _____ website contains factual material, such as libraries, encyclopedias, dictionaries, directories, guid...

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

Name two advantages of recycling scrap metal.

Welding: Principles and Applications (MindTap Course List)