Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

在包含啟用安全性工作群組的多使用者環境中,搭配查詢使用此宣告將查詢擁有者具備的相同權限授與執行查詢的使用者。

語法

sqlstatement
WITH OWNERACCESS OPTION

備註

WITH OWNERACCESS OPTION 宣告是選擇性的。

以下範例可讓使用者檢視薪資資訊 (即使使用者無權檢視「薪資」資料表),並假設查詢擁有者具備該權限:

SELECT LastName, FirstName, Salary
FROM Employees
ORDER BY LastName
WITH OWNERACCESS OPTION;

如果使用者無法建立或加入資料表,請使用 WITH OWNERACCESS OPTION 讓使用者產生資料表或新增查詢。

若要強制執行工作群組安全性設定和使用者的權限,請不要包含 WTH OWNERACCESS OPTION 宣告。

您必須具備與資料庫關聯的 System.mdw 檔案的存取權,才能使用此選項。 而且這個選項僅適用於已啟用安全性的多使用者實作。



Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×