![stop table delete with restrict on drop](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfP-hI5PVM3TCnvhdo75c95gGbH1GlQHiKHXGxqxF9AfhsSUp14M2l2cGnKLvvMVT_-4bkHzIFaIBJCmooRuZeZZIYXoanuqnicgISjx_ub2PiYF3PHbTr-mtAkH6NBp_x1ukQ0LLe_8yBY-2h67bPx3RmTnidQvdBfKLOlGoVYBfb_zDgC4t6rcee/s200/sql.png)
It is always a danger that someone will accidentally drop (delete) the wrong file, not maliciously just accidentally.
01 CREATE TABLE MYLIB.TABLE1 02 (COLUMN1 CHAR(1)) ; 03 DROP TABLE MYLIB.TABLE1 ; Statement ran successfully |
Within the new release of IBM i 7.5 is an addition to the Create Table statement that can prevent this. This does appear to be only in 7.5, I cannot find a mention of this in the documentation for IBM i 7.4 TR6.
This addition to the Create Table statement is: WITH RESTRICT ON DROP