Adding, Updating, or Deleting Records
Adding, Updating, or Deleting Records
Quiz Summary
0 of 11 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 11 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 11
1. Question
Let’s pretend DC is a state! Add DC as a state to the state table and add data for all the fields. You can look at the Structure tab in phpMyAdmin to see it. Here is some data:
- What should our state name be? Postal code stays same…let’s just do “The Washington” for now.
- Capitol and Biggest City will stay “Washington”
- 2010 Population: 604,453
- 2000 Population: 572,046
- Region – do you think we are Northeast or Southeast? Maryland is Northeast…Virginia is Southeast. Let’s go with Northeast – 1
- LandArea – 68.34
- You should know how many electors we have…..what color we are..and how many counties.
- If we became a state – we would have 1 house seat.
- Let’s dream that we get statehood next year – April 15, 2018
Now…what is the SQL to do that? Hint – there is a space after every comma…
CorrectIncorrect -
Question 2 of 11
2. Question
Let’s add Puerto Rico too! But, for Puerto Rico – let’s just add the fields that we know since we aren’t sure when they will become a state or how many electors or house members they will have. And they don’t really have counties.
- State name stays same… Postal code stays same..
- Capitol and Biggest City will stay is….”San Juan”
- 2010 Population: 3.722 million
- 2000 Population: 3.811 million
- Region – Southeast – 2
- LandArea – 3,515
- Color – Blue!!!!
Now…what is the SQL to do that? Hint – there is a space after every comma…
CorrectIncorrect -
Question 3 of 11
3. Question
How many states have 3 electors?
CorrectIncorrect -
Question 4 of 11
4. Question
How many states are in region 2?
CorrectIncorrect -
Question 5 of 11
5. Question
What SQL would you write (and do so!) to insert a state with the following values:
- Name: Test
- PostalCode: TE
- Region: 3
- Electors: 1
- HouseSeats: 1
CorrectIncorrect -
Question 6 of 11
6. Question
Based on their 2010 Population, how many electors and house seats should Puerto Rico have? Do a SQL statement to pull out states with similar population.
-
Puerto Rico should have electors and House Seats.
CorrectIncorrect -
-
Question 7 of 11
7. Question
Based on the last question, update Puerto Rico’s electors and house seats. What is the SQL?
CorrectIncorrect -
Question 8 of 11
8. Question
How many states have 7 electors?
CorrectIncorrect -
Question 9 of 11
9. Question
What SQL did you use to get that count?
CorrectIncorrect -
Question 10 of 11
10. Question
Update the state with postal code TE to have a Capitol called “Capitol” and LandArea of 55,000. What is the SQL you used?
CorrectIncorrect -
Question 11 of 11
11. Question
What is the SQL to delete the Test State?
CorrectIncorrect
