我需要在db範圍中設置變量什麼會包含django用戶ID什麼使DML查詢。 是這樣的: CREATE OR REPLACE FUNCTION set_user_id(auser_id integer)
RETURNS void AS
'GD["user_id"] = auser_id'
LANGUAGE plpythonu VOLATILE
COST 100
USE master
GO
DECLARE @DbName nvarchar(MAX)
SET @DbName = N'DataBase'
ALTER DATABASE @DbName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE @DbName SET OFFLINE WITH NO_WAIT
GO
ALTE