Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Steve Jones Finding the database RE: Finding the database
Toreador
SSChampion
Points: 11360
More actions
December 6, 2018 at 2:40 am
#2015637
it also makes no attempt to validate the string you pass in, soSELECT PARSENAME('x.y.z', 3)will always return 'x'ie it's a simple string-parsing method.
SELECT PARSENAME('x.y.z', 3)
Surely if you want to know the database name you just runSELECT DB_NAME()
SELECT DB_NAME()