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...
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 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
-In C Programming- Write a program to display the total rainfall for a year. In addition,...
-In C Programming- Write a program to display the total rainfall for a year. In addition, display the average monthly rainfall, and the months with the lowest and highest rainfall. Create an array to hold the rainfall values. Create a 2nd parallel array (as a constant) to hold the abbreviated names of the months. I created my arrays to be 1 element bigger than needed, and then disregarded element [0] (so that my months went from [1] = "Jan" to...
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...
5. Write the SQL query that accomplishes the task in the ZAGI Retail Company Sales Department...
5. Write the SQL query that accomplishes the task in the ZAGI Retail Company Sales Department Database: 5.1.3. Display the CustomerName and CustomerZip for all customers, sort alphabetically by CustomerName. 5.1.4. Display the RegionID of regions where we have stores (use only table STORES and do not display the same information more than once). 5.1.5 Display all the information for all stores whose ReigionID value is C 5.1.8 Display the ProductID, ProductName, ProductPrice, and VendorName for all products. Sort the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT