Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Friday, April 9, 2010 3:22 PM
How to check if current user have Drop Table permission using SQL statement?
I am writing a program to drop table; how ever i need to make sure current user have permission to "Drop table" before i do it.
Is there any SQL statement does it?
Thank You
William
Friday, April 9, 2010 3:50 PM ✅Answered
Have you looked at these:
http://msdn.microsoft.com/en-us/library/ms189802(v=SQL.100).aspx
http://msdn.microsoft.com/en-us/library/ms176097(v=SQL.100).aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
Monday, April 12, 2010 7:35 AM ✅Answered
SELECT HAS_PERMS_BY_NAME
('dbo.tablename','OBJECT', 'control') AS able_to_delete_table
Moreover you have to check whether you have alter permission on the schema of the table
Thanks, Leks