Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MYSQL Chapter 8 How to work with data types Exercises 1. Write a SELECT s from t

ID: 3598993 • Letter: M

Question

MYSQL

Chapter 8 How to work with data types Exercises 1. Write a SELECT s from the I table: The invoice total column A column that uses the FORMAT function to return the invoice total column with 1 digit to the right of the decimal point A column that uses the CONVERT function to return the invoice total column as an integer A column that uses the CAST function to return the invoice,total column as an integer Write a SELECT statement that returns these colums from the Inmvoices table: 2. The invoice_date column A column that uses the CAST function to return the invoice date column with its full date and time A column that uses the CAST function to return the invoice_ date column with just the year and the month

Explanation / Answer

1. Select invoice_total, FORMAT(invoice_total, 1),CONVERT (invoice_total, UNSIGNED), CAST(invoice_total as UNSIGNED) from Invoices ;

The above query retrieves invoice_total column in the required formats.

2. Select invoice_total, CAST(invoice_total as DATETIME), CAST(invoice_total as DATE) from Invoices ;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote