Consider the my_table table with two integer columns, a and b, and the contents as shown;
Mysql > SELECT a, b FROM my_table;
1 row in set result of this query?
SELECT a—b
FROM my_table;
A.
0
B.
2
C.
4
D.
An error message
Consider the my_table table with two integer columns, a and b, and the contents as shown;
Mysql > SELECT a, b FROM my_table;
1 row in set result of this query?
SELECT a—b
FROM my_table;
A.
0
B.
2
C.
4
D.
An error message
It’s C.
a-(-b) = a + b.
0 . A
if the question contains double minus, the answer is C otherwise A.
A or C
C
but remember that — is also a comment. So if there is space between ‘–‘ and ‘b’, from the comment to the end of the line everything will be treated as a comment. Just in case 😀
Double dash with space is comment