sql - Creating SP specific to a database? -
every time create stored procedure defaulting "master" database. how make sp specific database "uploads"?
create procedure testinsert2 insert [uploads].dbo.[aspnet_uploads] (userid, filename, username) values ('test1', 'test2', 'test3')
you need in context of database.
use uploads; go create procedure dbo.testinsert2 begin set nocount on; insert dbo.[aspnet_uploads](userid, filename, username) values('test1', 'test2', 'test3'); end go
Comments
Post a Comment