General solution for missing sequence numbers
"Peter Danes" wrote in message
...
"Chris2"
"Peter Danes" wrote in message
...
snip
snip
Sincerely,
Chris O.
There are three differences:
1. Your example is the same as my first example which returns only
the
"greatest +1", except that you additionally include an alias to
the table,
the "AS MT1" at the end of the statement. It doesn't hurt
anything, but
isn't really necessary.
Using table aliases may not be necessary, but I haven't written a
query more complicated than SELECT * FROM table_name in years
without them. The readability of SQL is greatly improved by their
use, and some queries cannot be written without them.
In any event, table aliases were not the purpose of my post.
I was only asking a question.
Sincerely,
Chris O.
|