HI, How can I specify wich database to use ?
i'm am making a webapp . each customer get there own database( about 4000 customers).
SO I was wundering can I do
DECLARE @CLAdatabase = test_db
USE @CLAdatabase
GO
SELECT* from
customers
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ali tuncerPosted Apr 26, 2016, 9:52 PM
Did you try writing the name of Database in front of Table name, like Abdu suggested?
from [Customer1].dbo.Table1
Cassie ModPosted Apr 26, 2016, 6:58 AM
Cassie ModPosted Apr 26, 2016, 6:58 AM
Amit KumarPosted Apr 26, 2016, 6:28 AM
Abdu RafeeqPosted Apr 26, 2016, 6:16 AM