This is a very stupid question, but I cant seem to add a view to a specific database, it gets added to the default master, which is no acceptable.
I have tried this in SQL Server 2008:
CREATE VIEW MyDB.Test AS
Select Orders.CustomerID
From Orders
I get the error msg:
The specified schema name "MyDB" either does not exist or you do not have permission to use it.
Thanks!
if you do have access try:
Use MyDb
Go
CREATE VIEW Test AS
Select Orders.CustomerID
From Orders
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With