For each of the following commands, how many rows are affected (updated, deleted, or inserted)? If the command causes an error, the number of affected rows is 0 (zero). a) DELETE FROM employees WHERE id = 3; [ Select ] 9 WHERE code = 2; [ Select] b) UPDATE jobs SET code %3D [ Select ] 8; %3D c) DELETE FROM jobs WHERE code d) INSERT INTO employees (name, job_code) VALUES ('Pluto', 10); IColect1

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
icon
Concept explainers
Question
data below.
Tables:
employees (id(pk), name, job_code(fk)) -- foreign key references jobs(code)
jobs (code(pk), title, salary)
mysql> SELECT FROM employees;
l id l name
--
| job_code !
-+---
1 Captain Hook
2I Tiger Lily
3 1 Pocahontas
1 1
1 1
21
4 I Meeko
5 I Woody
6 I Flik
7 I Dot
4 1
11
|
31
8 I Sofia, the First I
9 I Scully
| 12 | Olaf
| 14 | Aladdin
| 18 | Eeyore
| 19 | Pooh
| 20 | Piglet
| 25 | Scrooge
4 1
31
21
31
31
-+-
--+
+----+-
15 rows in set (0.00 sec)
mysql> SELECT FROM jobs;
---
---
+--
| salary I
| code I title
----
-+--
| 100.50 I
200.00 I
+---
1 author
2 1 editor
31 manager 150.00 I
0.00 I
250.00 I
41 student I
8 1 CFO
+.
+--
5 rows in set (0.00 sec)
4 m4 m~ mdm
Transcribed Image Text:data below. Tables: employees (id(pk), name, job_code(fk)) -- foreign key references jobs(code) jobs (code(pk), title, salary) mysql> SELECT FROM employees; l id l name -- | job_code ! -+--- 1 Captain Hook 2I Tiger Lily 3 1 Pocahontas 1 1 1 1 21 4 I Meeko 5 I Woody 6 I Flik 7 I Dot 4 1 11 | 31 8 I Sofia, the First I 9 I Scully | 12 | Olaf | 14 | Aladdin | 18 | Eeyore | 19 | Pooh | 20 | Piglet | 25 | Scrooge 4 1 31 21 31 31 -+- --+ +----+- 15 rows in set (0.00 sec) mysql> SELECT FROM jobs; --- --- +-- | salary I | code I title ---- -+-- | 100.50 I 200.00 I +--- 1 author 2 1 editor 31 manager 150.00 I 0.00 I 250.00 I 41 student I 8 1 CFO +. +-- 5 rows in set (0.00 sec) 4 m4 m~ mdm
I salary I
--
1 author
21 editor
| 100.50 I
| 200.00 I
3 I manager 150.00 I
4 1 student I
8 1 CFO
0.00 I
| 250.00 I
--+
5 rows in set (0.00 sec)
For each of the following commands, how many rows are affected (updated, deleted, or
inserted)? If the command causes an error, the number of affected rows is 0 (zero).
[ Select ]
a) DELETE FROM employees WHERE id = 3;
[ Select ]
23;
%3D
9 WHERE cOde
b) UPDATE jobs SET code
[ Select ]
c) DELETE FROM jobs WHERE code = 83;
d) INSERT INTO employees (name, job_code) VALUES ('Pluto', 10);
[ Select]
<>
<>
Transcribed Image Text:I salary I -- 1 author 21 editor | 100.50 I | 200.00 I 3 I manager 150.00 I 4 1 student I 8 1 CFO 0.00 I | 250.00 I --+ 5 rows in set (0.00 sec) For each of the following commands, how many rows are affected (updated, deleted, or inserted)? If the command causes an error, the number of affected rows is 0 (zero). [ Select ] a) DELETE FROM employees WHERE id = 3; [ Select ] 23; %3D 9 WHERE cOde b) UPDATE jobs SET code [ Select ] c) DELETE FROM jobs WHERE code = 83; d) INSERT INTO employees (name, job_code) VALUES ('Pluto', 10); [ Select] <> <>
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning