-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpr4
More file actions
61 lines (61 loc) · 1.36 KB
/
pr4
File metadata and controls
61 lines (61 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Challenge"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Add a new attribute, expore code that is a string of lenght 15, to products table\n",
"\n",
"- Ten new products with export_code set to \"Restricted\" must be added\n",
"\n",
"- Existing products must have their export_code column set to \"Unrestricted\"\n",
"\n",
"- Describe DDL commands required to implement these changes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Solution"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- ALTER TABLE ... ADD COLUMN to add export_code\n",
"- 10 INSERT statements with product data\n",
"- UPDATE statement to set export_code to \"Unrestricted\" WHERE export_code IS NULL"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}