use [DB]
go
declare cur_user_tables cursor for
select
all_obj.name
from
sys.all_objects as all_obj
inner join sys.schemas s on
s.name = 'dbo' and
s.schema_id = all_obj.schema_id
where
all_obj.type = 'U' and
all_obj.is_ms_shipped = 0
;
declare @table_name varchar(max)
declare @sql varchar(max)
open cur_user_tables;
fetch next from cur_user_tables
into @table_name;
while @@FETCH_STATUS = 0
begin
set @sql = 'delete from ' + @table_name;
print @sql
execute(@sql)
fetch next from cur_user_tables
into @table_name;
end
close cur_user_tables;
deallocate cur_user_tables;
go
2012年11月24日土曜日
自分のテーブルデータを一括削除
とりあえず、単純なものを。メモっとかないと忘れてしまう・・・
登録:
コメント (Atom)
SQL で MP4 をパース
SQL でビットマップ画像の2値化は4年位前に挑戦した。 最近、それの Impala 版 を作ったときに閃いた。 「再帰CTEがあるなら、mp4 もいけるんじゃないか」と。 やってみた。 use ragingo drop table video go create...
-
Hyper-V の 仮想マシン起動時のエラー 32788 に苦しめられたけど、イベントログ見れば一瞬で解決できたのでメモ イベントビューアー > アプリケーションとサービスログ > Microsoft > Windows > Hyper-V-**** ...
-
HTML1枚にぎゅっと詰まったシェーダー練習帳 gist https://gist.github.com/ragingo/e9edf399419dd90bd2894de9f48f6710 フラグメントシェーダーが終わったら、 今度は頂点シェーダーをやろう。
-
サービス「Windows Phone IP over USB Transport (IpOverUsbSvc)」が無いのに気づいた時点での開発環境 ・Windows 7 -> Windows 10 へのアップグレード ・VS2010, VS2013, VS2015 イン...