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-**** ...
-
以前やったSQLでの画像処理(2値化)です。 master.dbo.fn_varbintohexsubstring が遅すぎるから、そこだけ c# で対応しました。 処理前 処理後(SSMS -> Excel) use sample go --...
-
1. まず 「windows itunes サーバーが見つからない」 で検索 2. https://discussionsjapan.apple.com/thread/10171836?start=0&tstart=0 がヒット 3. インターネットオプ...
0 件のコメント:
コメントを投稿