Question

In: Computer Science

Web Programming Task + Database sql Write a command to display the ISBN number and the...

Web Programming Task + Database sql

  • Write a command to display the ISBN number and the price in the table books.
    • Question #2: What command did you enter?
    • Answer:
  • Write a command to increase the price of each book in the table books by 50 cents.
    • Question #3: What command did you enter?
    • Answer:
  • Write a command to display the price and title in the table books of ISBN 0-672-31697-8
    • Question #4: What command did you enter?
    • Answer:
  • Write a command to change the price in the table books of ISBN 0-672-31697-8 to 25.00.
    • Question #5: What command did you enter?
    • Answer:
  • Write a command to insert yourself into the table customers. Remember customerid is autoincrement.
    • Question #6: What command did you enter?
    • Answer:
  • Write a command to delete yourself from the table customers.
    • Questin #7: What cmmand did you enter?
    • Answer:

Solutions

Expert Solution

Write a command to display the ISBN number and the price in the table books.

  • Question #2: What command did you enter?
  • Answer: SELECT ISBN, price from books;

Write a command to increase the price of each book in the table books by 50 cents.

  • Question #3: What command did you enter?
  • Answer: UPDATE books SET price = price + 0.50;

Write a command to display the price and title in the table books of ISBN 0-672-31697-8

  • Question #4: What command did you enter?
  • Answer: SELECT price, title FROM books WHERE ISBN = '0-672-31697-8';

Write a command to change the price in the table books of ISBN 0-672-31697-8 to 25.00.

  • Question #5: What command did you enter?
  • Answer: UPDATE books SET price = 25.00 WHERE ISBN = '0-672-31697-8';

Write a command to insert yourself into the table customers. Remember customerid is autoincrement.

  • Question #6: What command did you enter?
  • Answer: INSERT INTO customers (name) VALUES ('Ryan Gosling');

Write a command to delete yourself from the table customers.

  • Questin #7: What cmmand did you enter?
  • Answer: DELETE FROM customers WHERE name='Ryan Gosling';

Related Solutions

SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided you with the creation script for the AdditionCollege database. Run this script in MySQL Workbench to create the database. You should execute your query solutions to extract the necessary information. The script is based on the following schematic: Unit (Unit_code, Staff_id, [UnitName]) Staff (Staff_id, StaffName, Position, Gender) Taught_by (Unit_code, Staff_id, weekday) Student (Student_id, Student_name, Address, Gender) TuteGroup (TuteGroup_code, Unit_code, DayHrCode, Room_Nr) TuteGroup_List (TuteGroup_code, Student_id)...
Write an ISBN Validator in C language What are ISBN? ISBN, or International Standard Book Number,...
Write an ISBN Validator in C language What are ISBN? ISBN, or International Standard Book Number, is a numeric identifier for commercially printed books. Prior to 2007, they had 10 digits, but all newly issued ISBN use 13 digits. They are used to uniquely identify a book and consist of several portions. These include the registrant group, publisher, title, and a check digit. The registrant group indicates where the publisher is located. For example a registrant group of 0 or...
Write the SQL queries that accomplish the following tasks using the AP Database 9. Write a...
Write the SQL queries that accomplish the following tasks using the AP Database 9. Write a select statement to show the invoicelineitemdescriptions that have the total invoicelineitemamount >1000 and the number of accountno is >2. 10. Write a select statement that returns the vendorid, paymentsum of each vendor, and the number of invoices of each vendor, where paymentsum is the sum of the paymentotal column. Return only the top ten vendors who have been paid the most and the number...
IN MY SQL: - Display each Author’s ID, first and last names and the total number...
IN MY SQL: - Display each Author’s ID, first and last names and the total number of pages for all of the Books they have written. - Display each Book genre as well as the number of Books written in that genre with the column header “Number Of Books” - Display the Author’s first and last name, as well as their ID, and the Book title and number of pages for all of the books they have written that have...
Based on the tables below, write SQL command to perform the following tasks for MySql: Create...
Based on the tables below, write SQL command to perform the following tasks for MySql: Create SALESREP and CUSTOMER tables Create primary and foreign keys as appropriate. The custNo should use a surrogate key as the primary key with auto-increment increase the balance of the Gonzales account by $100 to a total of $450? Find an average customer balance Display the name of the sales representative and the name of the customer for each customer that has a balance greater...
1. Write a bash command that will display the value of all environment variables defined in...
1. Write a bash command that will display the value of all environment variables defined in your shell process, sorted in alphabetical order, and numbered. Here is a sample of the type of output your command should produce: 1 } 2 ALSA_CONFIG_PATH=/etc/alsa-pulse.conf 3 AUDIODRIVER=pulseaudio 4 BASH_FUNC_mc%%=() { . /usr/share/mc/mc-wrapper.sh 5 COLORTERM=1 2. Write a bash command that will display the value (and only the value) of the JAVA_ROOT environment variable. Here is a sample of the type of output your...
This is t a relational database please write SQL queries to solve the listed questions. The...
This is t a relational database please write SQL queries to solve the listed questions. The database is a variation of the “Movie Database” . There are several differences in it, so look it over carefully before writing your SQL queries Notes: TheaterNum, MovieNum, and ActorNum are numeric primary key fields in their respective tables. Movie and actor names are not assumed to be unique unless specified otherwise in a question. In the THEATER table, Capacity is the number of...
***This is done with Java programming*** Write a well-documented (commented) program, “ISBN,” that takes a 9-digit...
***This is done with Java programming*** Write a well-documented (commented) program, “ISBN,” that takes a 9-digit integer as a command-line argument, computes the checksum, and prints the ISBN number. You should use Java’s String data type to implement it. The International Standard Book Number (ISBN) is a 10-digit code that uniquely specifies a book. The rightmost digit is a checksum digit that can be uniquely determined from the other 9 digits, from the condition that d1 + 2d2 +3d3 +...
Write an SQL command that creates a SHOP table. The table should have a shop_id, a shop_name, a shop_location
Write an SQL command that creates a SHOP table. The table should have a shop_id, a shop_name, a shop_location
Write a SQL script to add another table to your database. Include these fields in your...
Write a SQL script to add another table to your database. Include these fields in your Product table: Field Name Description Data Type Sample Value ProductID Product ID integer 5 ProductName Product Name varchar(50) candle Description Product Description varchar(255) Bee’s wax candle picUrl Filename of the product’s picture varchar(50) candle.gif Price Product Price decimal 10.99           ProductID should be the Primary Key. It is an auto-increment field.           The Price field stores prices to 7 significant digits and to 2...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT