I'm not entirely sure why this doesn't work. I'm sure its very basic SQL and I'm missing something somewhere.
SELECT COUNT(*)
FROM (SELECT MIN(sys.tables.name)
FROM sys.tables)
I'm getting this error Message::
Msg 102, Level 15, State 1, Line 4 Incorrect syntax near ')'.
The correct output should be just one number, the number of rows in the first table in the current database.