Below are five methods you can use to quickly determine how many user-defined tables are in the current database in SQL Server.
All five options use the COUNT()
function to get the count. Obviously, you can replace this with an asterisk (*
), or the names of the columns to return a list of all user-defined tables.