Microsoft SQL Server Management Studio Select Database Syntax Error

27 Views Asked by At

I'm trying to type out some code to return the name of the current database. Literally every place I've seen says that you can type out

SELECT DATABASE()

to return that information, but when I try to do it in SSMS I get a syntax error for the DATABASE() function. No idea why it isn't working.

0

There are 0 best solutions below