Skip to content

Commit 9b5c9f1

Browse files
authored
Update example-sql-statements-that-generate-error-message.sql
1 parent 33bc33a commit 9b5c9f1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
//Correct syntax
1+
# Correct syntax
22
ALTER TABLE specification
33
ADD CONSTRAINT specification_program_id_fkey
44
FOREIGN KEY (program_id)
55
REFERENCES program (id);
66

7-
//Incorrect syntax; jumbled syntax
7+
# Incorrect syntax; jumbled syntax
88
ALTER TABLE specification
99
ADD FOREIGN KEY specification_program_id_fkey
1010
CONSTRAINT(program_id)
1111
REFERENCES program(id);
1212

13-
//Incorrect syntax; wrong punctuation
13+
# Incorrect syntax; wrong punctuation
1414
ALTER TABLE specification (
1515
ADD CONSTRAINT
1616
specification_program_id_fkey
1717
FOREIGN KEY(program_id)
1818
REFERENCES program (id)
1919
);
2020

21-
//Incorrect syntax; a reserved word
21+
# Incorrect syntax; a reserved word
2222
ALTER TABLE specification
2323
ADD CONSTRAINT foreign
2424
FOREIGN KEY (program_id)
2525
REFERENCES program (id);
2626

27-
//Incorrect syntax, misspelled keyword REFERENCES
27+
# Incorrect syntax, misspelled keyword REFERENCES
2828
ALTER TABLE specification
2929
ADD CONSTRAINT specification_program_id_fkey
3030
FOREIGN KEY(program_id)
3131
REFERENCE program (id);
3232

33-
//Incorrect syntax, missing closing parenthesis
33+
# Incorrect syntax, missing closing parenthesis
3434
ALTER TABLE specification
3535
ADD CONSTRAINT specification_program_id_fkey
3636
FOREIGN KEY(program_id
3737
REFERENCES program (id);
3838

39-
//Incorrect syntax; quotes
39+
# Incorrect syntax; quotes
4040
ALTER TABLE "specification"
4141
ADD CONSTRAINT specification_program_id_fkey
4242
FOREIGN KEY("program_id")
4343
REFERENCES program ("id");
4444

45-
//Correct syntax; backticks
45+
# Correct syntax; backticks
4646
ALTER TABLE `specification`
4747
ADD CONSTRAINT specification_program_id_fkey
4848
FOREIGN KEY(`program_id`)
4949
REFERENCES program (`id`);
5050

51-
//Incorrect syntax, missing required elements
51+
# Incorrect syntax, missing required elements
5252
ALTER TABLE specification
5353
ADD CONSTRAINT specification_program_id_fkey
5454
FOREIGN KEY(program_id);

0 commit comments

Comments
 (0)