Skip to content

Commit 9cd375d

Browse files
Update README.md
1 parent c320979 commit 9cd375d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ JOIN name on principals.nconst = name.nconst;
470470

471471
If we want to make a table out of this query, we just need to add ```CREATE TABLE our_new_table_name AS``` in front of the query (adding in our own table name, of course). This is what it looks like:
472472

473-
```CREATE TABLE principals_movies AS
473+
```
474+
CREATE TABLE principals_movies AS
474475
SELECT principals.nconst, name.primaryName, principals.category, principals.job, principals.characters, basics.tconst, basics.primaryTitle, basics.startYear, basics.runtimeMinutes
475476
FROM principals
476477
LEFT JOIN basics USING (tconst)
@@ -526,7 +527,7 @@ ALTER TABLE principals_movies
526527
ADD acting_role INTEGER DEFAULT 0;
527528
```
528529

529-
And now we update the column to be 1 where the *category* is *actor* or *actress*:
530+
Note that the *DEFAULT* argument is optional, but if you leave it blank, it will make the default value NULL. Now we update the column to be 1 where the *category* is *actor* or *actress*:
530531

531532
```
532533
UPDATE principals_movies

0 commit comments

Comments
 (0)