Question

Mike has created the small database to store the tools for homes, you need to INSERT...

Mike has created the small database to store the tools for homes, you need to INSERT some test data into 3 tables.

Please write at least 2 rows into each of the 3 tables. Provide insert example code only

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In SQL, INSERT command is used to insert the required fields in the given table. To insert an valu in a table, we use the command or keywork: INSERT INTO followed by the name of the table and the n follwed by VALUES.

One this part is done, we start the parenthesis and start giving the values as per the table values.

Example - INSERT INTO tablename VALUEE( 100, 'valuename')

As in your case, I have create a simple sql command to insert values into a table.

As per question, I have given 2 rows for each table and then printed the result with the command SELECT * FROM tablename; which prints the contents of the table.

Here is the sample code example:
I.lt Result 1 $sqlite3 database.sdb <main.sql 4. 100 driller1 200 driller2 150 Hammer1 250 Hammer2 350 Wrenchi 450 Wrenchr2 8

  • CREATE TABLE Drillers(cost int, drillername varchar); is used to create a table with name Drillers.
  • int specifies the value to be an integer.
  • varchar specifies the value to be a variable character
  • To views the contents of the table, we use the command: SELECT * FROM Drillers;

PLEASE UPVOTE IF THIS HELPED YOU

Let me know if you have any doubts in the comment section.

Add a comment
Know the answer?
Add Answer to:
Mike has created the small database to store the tools for homes, you need to INSERT...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3. Write a script that adds rows to the database that you created in exercise 2....

    3. Write a script that adds rows to the database that you created in exercise 2. Add two rows to the Users and Products tables. Add three rows to the Downloads table: one row for user 1 and product 2; one row for user 2 and product 1; and one row for user 2 and product 2. Use the SYSDATE function to insert the current date into the download_date column. Use the sequences created in the previous exercise to get...

  • Hi Please help me ASAP need SQL commands only for MS Access The following tables provide...

    Hi Please help me ASAP need SQL commands only for MS Access The following tables provide a very small portion of the data that will be kept in the database. The data needs to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Problem 47. (If required by your DBMS, be certain to save the rows permanently.) only for MS Access!!!

  • Questions: Assume you are creating a database for IS paint store. Suppose you have an ER diagram ...

    Questions: Assume you are creating a database for IS paint store. Suppose you have an ER diagram like the following: Please answer the following questions. Explain your answer. 1. Convert the ER diagrams to relational tables. 2. Specify primary keys and foreign keys in each table. For foreign keys, specify which primary key it references to. 3. Please create the tables in SQL for the relational tables in our ER diagrams. You also need to define primary keys and foreign...

  • You were requested to design a database to store the data concerning a large mechanic shop....

    You were requested to design a database to store the data concerning a large mechanic shop. Your database has to store the following: For each car, you want to store the make, model, year, color, engine info, license plate, VIN (vehicle identification number), and a field for general notes. Additionally, for each car, you need to keep information about the owner. For each owner, you need to store the client ID, the name, address information, phone number, and email. An...

  • The owner of a small chain of appliance stores wants to build a database to help...

    The owner of a small chain of appliance stores wants to build a database to help track data about its regions, stores, employees and jobs.  The chain has divided the map of where its stores exists into various regions. Each region has a description (of boundaries).  Each store is named, has an average market size (expressed in dollars) and belongs to s specific region. Each store also has an address, city, state, and zip.  The database should...

  • The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.

    The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.Student (studNo, studName, address, mobileNo)Course (courseNo, courseName, creditHour, level) Registration (studNo, courseNo, regDate, semester, session)Project (projNo, projName, courseNo)Assignment (projNo, studNo, startDate, dueDate, hoursSpent)Write SQL queries based on the student database given above: 1. Create tables & constraints for the student database.2. Insert some data into the tables to check that the tables created are correct. No limit on how many rows you want...

  • Consider the following scenario: You are the owner of a coffee shop. You need a way...

    Consider the following scenario: You are the owner of a coffee shop. You need a way to track all of your customers, orders, and any sales you may be running. with the data you store, you will be running reports each month to gain insight into the overall wellbeing of the coffee shop. Things like, the number of customers per day, what they order, and how often they return are important to you. Provide the following: 1. Create an ER...

  • SUBJECT: INFORMATION TECHNOLOGY, CLASS: ADVANCE DATABASE MANAGEMENT Hello Everyone, I need help on a project for...

    SUBJECT: INFORMATION TECHNOLOGY, CLASS: ADVANCE DATABASE MANAGEMENT Hello Everyone, I need help on a project for my ITD 256 Class. These are the questions I am suppose to answer: Project: The project should include designing a database deals with making a proposal for the database implementation. You can either try to fix an existing problem in your business or create a new database for the new projects or new clients. Please define the objective, scope, and time frame of your...

  • The goal of this homework is to write a small database system for an Animal Shelter....

    The goal of this homework is to write a small database system for an Animal Shelter. This is a no-kill shelter like the one just west of the Addition Airport. You will accept animal “donations” to the shelter, but mostly only dogs and cats. (But yes, there may be the occasional hamster or other nondog, non-cat animal donation.) At present, all we need to do is write the skeleton of a database that will track all the animals in the...

  • 2. Write a script that implements the following design: In the Downloads table, the user_id and...

    2. Write a script that implements the following design: In the Downloads table, the user_id and product_id columns are the foreign keys. Create these tables in the ex schema. Create the sequences for the user_id, download_id, and product_id columns. Include a PL/SQL script to drop the table or sequence if it already exists. Include any indexes that you think are necessary. 3. Write a script that adds rows to the database that you created in exercise 2. Add two rows...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT