Question: First review the query requirements below, identify table ( s ) and columns needed for each query, then create another test database and the tables,
First review the query requirements below, identify tables and columns needed for each query, then create another test database and the tables, and answer each question below. Hint: there are only tables
You are encouraged to insert a few database records into each table for testing your queries and the results.
Remember to capture a screenshot of the output for each question.
Write a MySQL query to select all the columns from the "students" table where the "city" is "San Diego".
Write a MySQL query to select the "coursename" and "term" columns from the "courses" table and order them by "coursename" in descending order.
Write a PHP script that retrieves all the rows from the "students" table where the "studentfirstname" is equal to John.
Write a PHP script that retrieves all the rows from the "students" table where the "GPA" is greater than or equal to AND the "major" is ASD.
Write a PHP script that retrieves all the rows from the "students" table where the "state" is CA OR the "state" is NY
Write a MySQL query to update the "GPA" column of the "students" table to where the "studentid is equal to
Write a PHP script to insert a new row into the "students" table with the following values: "John" for the "studentfirstname" column, "Doe" for the "studentlastname" column, Main St for the "address" column, "Los Angeles" for the "city" column, CA for the "state" column, and for the "zip" column.
Write a PHP script that deletes all the rows from the "courses" table where the "coursename" is NULL.
Write a MySQL query to select all the rows from the "courses" table where the "coursestatus" column is NULL.
Write a MySQL query that selects all rows from a table called "courses" where courseid stats with "ASD".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
