DEFINITIONS

Definitions More Info.
Definition ID253
TitleSQL
CategorySCRIPT
DefinitionSQL truncate table stored procedure
Definition DescriptionBu sp yi her kullaninin truncate yetkisi olmadigindan,bu yetkiyi sadece DBA kullanabileceginden dolayi yazdım.Bu sayede gerekli tablolari truncate edilebilecek. USE [SMS] GO /****** Object: StoredProcedure [dbo].[up_TruncateTable] Script Date: 09/20/2012 15:05:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE procedure [dbo].[up_TruncateTable] @table VARCHAR(100) with execute as owner as begin --set @table = 'hede' declare @string varchar(1000) set @string = 'TRUNCATE TABLE '+@table exec (@string) end GO
RecordBycunay
Record Date20-09-2012 15:07:16
Düzenle
Kopyala
Sil