CST225Quiz4 Done

.docx

School

North Carolina A&T State University *

*We aren’t endorsed by this school

Course

225

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

docx

Pages

6

Report

Uploaded by DeanMoon9058

CST225 Quiz#4: SQL I Spring2024 Problem: Reading quiz. Note : Please read/review the lecture notes for basic SQL chapter in preparation for this quiz. XAMPP is REQUIRED!!! (See how to download Xampp in the software folder located on Blackboard. Go over the slides then write , run the SQL queries for the following questions and show the result of each query. ( SCREENSHOTS OF SYNTAXES AND RESULTS). You can either use XAMPP shell, the command prompt or php admin please see lab 4 Noah Thompson 1. Connect to mysql 2. Show all the databases. 3. Create a new database called "lastname_db".(where lastname is your last name) Page | 1
CST225 Quiz#4: SQL I Spring2024 4. Set the "lastname_db"(where lastname is your last name) database as the default database. 5. Show all the tables in the default database. 6. Create a new table called "Departments" with the columns and type indicated below. deptName VARCHAR(20) building VARCHAR(15) budget FLOAT(12,2) Biology Watson 90000.00 Comp.Sci. Taylor 100000.00 Elec.Eng. Taylor 85000.00 Finance Painter 120000.00 7. Insert the above records in the Departments Table Page | 2
CST225 Quiz#4: SQL I Spring2024 8. Create another new table called "Instructors" with the columns and type indicated below. ID CHAR(5) name VARCHAR(30) deptName VARCHAR(20) salary FLOAT(10,2) 12121 Alice Wu Finance 90000.00 15151 John Mozart Music 40000.00 22222 Frank Einstein Physics 95000.00 32343 El Said History 60000.00 33456 Chelsea Dunn Physics 90000.00 9. Insert the above records in the Instructors Table 10. Delete from the departments table the comp.Sci. Department Page | 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help