|
1 |
| -//Correct syntax |
| 1 | +# Correct syntax |
2 | 2 | ALTER TABLE specification
|
3 | 3 | ADD CONSTRAINT specification_program_id_fkey
|
4 | 4 | FOREIGN KEY (program_id)
|
5 | 5 | REFERENCES program (id);
|
6 | 6 |
|
7 |
| -//Incorrect syntax; jumbled syntax |
| 7 | +# Incorrect syntax; jumbled syntax |
8 | 8 | ALTER TABLE specification
|
9 | 9 | ADD FOREIGN KEY specification_program_id_fkey
|
10 | 10 | CONSTRAINT(program_id)
|
11 | 11 | REFERENCES program(id);
|
12 | 12 |
|
13 |
| -//Incorrect syntax; wrong punctuation |
| 13 | +# Incorrect syntax; wrong punctuation |
14 | 14 | ALTER TABLE specification (
|
15 | 15 | ADD CONSTRAINT
|
16 | 16 | specification_program_id_fkey
|
17 | 17 | FOREIGN KEY(program_id)
|
18 | 18 | REFERENCES program (id)
|
19 | 19 | );
|
20 | 20 |
|
21 |
| -//Incorrect syntax; a reserved word |
| 21 | +# Incorrect syntax; a reserved word |
22 | 22 | ALTER TABLE specification
|
23 | 23 | ADD CONSTRAINT foreign
|
24 | 24 | FOREIGN KEY (program_id)
|
25 | 25 | REFERENCES program (id);
|
26 | 26 |
|
27 |
| -//Incorrect syntax, misspelled keyword REFERENCES |
| 27 | +# Incorrect syntax, misspelled keyword REFERENCES |
28 | 28 | ALTER TABLE specification
|
29 | 29 | ADD CONSTRAINT specification_program_id_fkey
|
30 | 30 | FOREIGN KEY(program_id)
|
31 | 31 | REFERENCE program (id);
|
32 | 32 |
|
33 |
| -//Incorrect syntax, missing closing parenthesis |
| 33 | +# Incorrect syntax, missing closing parenthesis |
34 | 34 | ALTER TABLE specification
|
35 | 35 | ADD CONSTRAINT specification_program_id_fkey
|
36 | 36 | FOREIGN KEY(program_id
|
37 | 37 | REFERENCES program (id);
|
38 | 38 |
|
39 |
| -//Incorrect syntax; quotes |
| 39 | +# Incorrect syntax; quotes |
40 | 40 | ALTER TABLE "specification"
|
41 | 41 | ADD CONSTRAINT specification_program_id_fkey
|
42 | 42 | FOREIGN KEY("program_id")
|
43 | 43 | REFERENCES program ("id");
|
44 | 44 |
|
45 |
| -//Correct syntax; backticks |
| 45 | +# Correct syntax; backticks |
46 | 46 | ALTER TABLE `specification`
|
47 | 47 | ADD CONSTRAINT specification_program_id_fkey
|
48 | 48 | FOREIGN KEY(`program_id`)
|
49 | 49 | REFERENCES program (`id`);
|
50 | 50 |
|
51 |
| -//Incorrect syntax, missing required elements |
| 51 | +# Incorrect syntax, missing required elements |
52 | 52 | ALTER TABLE specification
|
53 | 53 | ADD CONSTRAINT specification_program_id_fkey
|
54 | 54 | FOREIGN KEY(program_id);
|
0 commit comments