I notice when writing queries that Access will add in a semicolon at the end of my query. Its just one of those Access things right? We don't have to remember to write the semicolon, as Access adds it in for us correct.
The only time this is significant to know is in a situation like this - in a UNION query We may end up cutting and pasting code from 2 queries together, like this:
So does that mean if we wanted to use a semicolon in our query search
string, we would have to enclose it like you do an asterisk [;], or is
using the double quotes enough?
For example:
SELECT *
FROM TABLE1
UNION
SELECT *
FROM TABLE2
if you were to accidentally do this:
SELECT *
FROM TABLE1; (<- leave in the semicolon from the first query)
UNION
SELECT *
FROM TABLE2;
Then your query wouldn't run. You can only have one semicolon in a query in Access, and it has to be at the end.
In SQL a semicolon (;) is intended to end a SQL statement. MS Access handles this a bit differently. This solution briefly explains how MS Access handles the ; and explains the advantages of using a ; the way it was intended.