6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

無限ループSQL

Posted at

無限にループして終了しないQuery
明示的にrollbackやcancelを行う必要があります。
テスト等に使用可能です。

with temp(c1) as
(select 1 from tablename union all select c1 from temp)
select * from temp

※注意点※
・tablenameは任意のdummy表を指定してください。
・DB2 for z/OSでは稼働することを確認済みです。他のRDBMSではエラーとなる可能性があります。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?