Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Permission to TRUNCATE TABLE
Message
General information
Forum:
Microsoft SQL Server
Category:
Security
Miscellaneous
Thread ID:
00857388
Message ID:
00857632
Views:
30
>What if you were to create a stored procedure that executes the TRUNCATE TABLE and then give exec priveleges on the SP to that user?


Based on BOb's point, this probably would not have worked. I wanted to try it as an excercise but could not get SQL Server to accept the syntax. Here's what I attempted...
CREATE PROCEDURE dbo.procZAP
			@tTableName varchar(255)=NULL
AS

TRUNCATE TABLE @tTableName

GO
It doesn't seem to like the TRUNCATE TABLE line, although based on my reading of the help and other books, this should be correct. Do you see my error?
Del
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform