By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | surname | kids | address | sports | team | last_updated |
---|
kidCode | surname | name | address | sports | team | age | class | teacher | parentID | join_date |
---|
Added trigger to insert/update kids when parents data changes
5 rows affected
id | surname | kids | address | sports | team | last_updated |
---|---|---|---|---|---|---|
1 | Adams | John, Jane, Jack | 123 Lane road | Baseball | Blue | 2021-08-23 11:07:05.197 |
2 | Benson | Emily, Todd, Kris | 234 Town place | Swimming | Red | 2021-08-23 11:07:05.197 |
3 | Chad | Chuck, Allison, Megan, Dorothy | 345 Busy city | Basketball | null | 2021-08-23 11:07:05.197 |
4 | Domer | Samuel | 111 Right here | null | Red | 2021-08-23 11:07:05.197 |
5 | Emerson | James, Daniel | null | Soccer | Red | 2021-08-23 11:07:05.197 |
kidCode | surname | name | address | sports | team | age | class | teacher | parentID | join_date |
---|---|---|---|---|---|---|---|---|---|---|
6F05F3CC409BA67920F5E1A66C06AC98 | Adams | John | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
80FA327106B4F5D75E24B72B7B291CD6 | Adams | Jane | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
172CD4EF4C0A8CF701CC83DEC9E80DDC | Adams | Jack | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
DE2040D38B2762F50FFB8D08AC139C4C | Benson | Emily | 234 Town place | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
CD77DD8B98BDFCE49445277DA0E7E69B | Benson | Todd | 234 Town place | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
3E35EF53ED28987CA7F7DCDB31670E9E | Benson | Kris | 234 Town place | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
1D35D4CFAE57886CE1C097505D9BDC49 | Chad | Chuck | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
1C30D906BDD6A8AD66690821B57B8F81 | Chad | Allison | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
00705F1D46D11D51D0AE7C96B15CB31F | Chad | Megan | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
A98DDFCD1D836E5DA8164B76CDF44C97 | Chad | Dorothy | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
0AD8952EF5BB794CBA41D677E2359F4E | Domer | Samuel | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.213 |
5D7844D118DFF07780DA91DE5E03865B | Emerson | James | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
B122AC1B157F0534F3F13DFB9BA4FFE9 | Emerson | Daniel | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
Kids successfully inserted
Added trigger to insert/update kids when parents data changes
1 rows affected
id | surname | kids | address | sports | team | last_updated |
---|---|---|---|---|---|---|
1 | Adams | John, Jane, Jack | 123 Lane road | Baseball | Blue | 2021-08-23 11:07:05.197 |
2 | Benson | Emily, Todd, Kris | 17 Small town | Swimming | Red | 2021-08-23 11:07:05.213 |
3 | Chad | Chuck, Allison, Megan, Dorothy | 345 Busy city | Basketball | null | 2021-08-23 11:07:05.197 |
4 | Domer | Samuel | 111 Right here | null | Red | 2021-08-23 11:07:05.197 |
5 | Emerson | James, Daniel | null | Soccer | Red | 2021-08-23 11:07:05.197 |
kidCode | surname | name | address | sports | team | age | class | teacher | parentID | join_date |
---|---|---|---|---|---|---|---|---|---|---|
6F05F3CC409BA67920F5E1A66C06AC98 | Adams | John | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
80FA327106B4F5D75E24B72B7B291CD6 | Adams | Jane | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
172CD4EF4C0A8CF701CC83DEC9E80DDC | Adams | Jack | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
DE2040D38B2762F50FFB8D08AC139C4C | Benson | Emily | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
CD77DD8B98BDFCE49445277DA0E7E69B | Benson | Todd | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
3E35EF53ED28987CA7F7DCDB31670E9E | Benson | Kris | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
1D35D4CFAE57886CE1C097505D9BDC49 | Chad | Chuck | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
1C30D906BDD6A8AD66690821B57B8F81 | Chad | Allison | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
00705F1D46D11D51D0AE7C96B15CB31F | Chad | Megan | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
A98DDFCD1D836E5DA8164B76CDF44C97 | Chad | Dorothy | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
0AD8952EF5BB794CBA41D677E2359F4E | Domer | Samuel | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.213 |
5D7844D118DFF07780DA91DE5E03865B | Emerson | James | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
B122AC1B157F0534F3F13DFB9BA4FFE9 | Emerson | Daniel | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
Address successfully updated for all kids of parentID = 2
Added trigger to insert/update kids when parents data changes
1 rows affected
id | surname | kids | address | sports | team | last_updated |
---|---|---|---|---|---|---|
1 | Adams | John, Jane, Jack | 123 Lane road | Baseball | Blue | 2021-08-23 11:07:05.197 |
2 | Benson | Emily, Todd, Kris | 17 Small town | Swimming | Red | 2021-08-23 11:07:05.213 |
3 | Chad | Chuck, Allison, Megan, Dorothy | 345 Busy city | Basketball | null | 2021-08-23 11:07:05.197 |
4 | Domer | Samuel, Taylor | 111 Right here | null | Red | 2021-08-23 11:07:05.230 |
5 | Emerson | James, Daniel | null | Soccer | Red | 2021-08-23 11:07:05.197 |
kidCode | surname | name | address | sports | team | age | class | teacher | parentID | join_date |
---|---|---|---|---|---|---|---|---|---|---|
6F05F3CC409BA67920F5E1A66C06AC98 | Adams | John | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
80FA327106B4F5D75E24B72B7B291CD6 | Adams | Jane | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
172CD4EF4C0A8CF701CC83DEC9E80DDC | Adams | Jack | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
DE2040D38B2762F50FFB8D08AC139C4C | Benson | Emily | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
CD77DD8B98BDFCE49445277DA0E7E69B | Benson | Todd | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
3E35EF53ED28987CA7F7DCDB31670E9E | Benson | Kris | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
1D35D4CFAE57886CE1C097505D9BDC49 | Chad | Chuck | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
1C30D906BDD6A8AD66690821B57B8F81 | Chad | Allison | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
00705F1D46D11D51D0AE7C96B15CB31F | Chad | Megan | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
A98DDFCD1D836E5DA8164B76CDF44C97 | Chad | Dorothy | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
0AA89CB538025343702333D0ACB2C6AB | Domer | Taylor | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.230 |
0AD8952EF5BB794CBA41D677E2359F4E | Domer | Samuel | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.213 |
5D7844D118DFF07780DA91DE5E03865B | Emerson | James | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
B122AC1B157F0534F3F13DFB9BA4FFE9 | Emerson | Daniel | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
Question 1, now solved. New row has been added for the new kid Taylor Domer
Added trigger to insert/update kids when parents data changes
1 rows affected
id | surname | kids | address | sports | team | last_updated |
---|---|---|---|---|---|---|
1 | Arbogast | John, Jane, Jack | 123 Lane road | Baseball | Blue | 2021-08-23 11:07:05.243 |
2 | Benson | Emily, Todd, Kris | 17 Small town | Swimming | Red | 2021-08-23 11:07:05.213 |
3 | Chad | Chuck, Allison, Megan, Dorothy | 345 Busy city | Basketball | null | 2021-08-23 11:07:05.197 |
4 | Domer | Samuel, Taylor | 111 Right here | null | Red | 2021-08-23 11:07:05.230 |
5 | Emerson | James, Daniel | null | Soccer | Red | 2021-08-23 11:07:05.197 |
kidCode | surname | name | address | sports | team | age | class | teacher | parentID | join_date |
---|---|---|---|---|---|---|---|---|---|---|
6F05F3CC409BA67920F5E1A66C06AC98 | Arbogast | John | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
80FA327106B4F5D75E24B72B7B291CD6 | Arbogast | Jane | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
172CD4EF4C0A8CF701CC83DEC9E80DDC | Arbogast | Jack | 123 Lane road | Baseball | Blue | null | null | null | 1 | 2021-08-23 11:07:05.213 |
DE2040D38B2762F50FFB8D08AC139C4C | Benson | Emily | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
CD77DD8B98BDFCE49445277DA0E7E69B | Benson | Todd | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
3E35EF53ED28987CA7F7DCDB31670E9E | Benson | Kris | 17 Small town | Swimming | Red | null | null | null | 2 | 2021-08-23 11:07:05.213 |
1D35D4CFAE57886CE1C097505D9BDC49 | Chad | Chuck | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
1C30D906BDD6A8AD66690821B57B8F81 | Chad | Allison | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
00705F1D46D11D51D0AE7C96B15CB31F | Chad | Megan | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
A98DDFCD1D836E5DA8164B76CDF44C97 | Chad | Dorothy | 345 Busy city | Basketball | null | null | null | null | 3 | 2021-08-23 11:07:05.213 |
0AA89CB538025343702333D0ACB2C6AB | Domer | Taylor | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.230 |
0AD8952EF5BB794CBA41D677E2359F4E | Domer | Samuel | 111 Right here | null | Red | null | null | null | 4 | 2021-08-23 11:07:05.213 |
5D7844D118DFF07780DA91DE5E03865B | Emerson | James | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
B122AC1B157F0534F3F13DFB9BA4FFE9 | Emerson | Daniel | null | Soccer | Red | null | null | null | 5 | 2021-08-23 11:07:05.213 |
Question 2, now solved. Surname successfully updated.