w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
AS400 SQL query similar to CLRLIB (clear library) in native AS400

(note that the term COLLECTION has been deprecated, SCHEMA is the current term)

Since a library can contain both SQL and non-SQL objects, there's no SQL way to delete every possible object type.

Dropping the schema and recreating it might work. But note that if the library is in a job's library list, it will have a lock on it and you will not be able to drop it. Also, unless the library was originally created via CREATE SCHEMA (or CREATE COLLECTION) you're going to end up with differences.

CRTLIB creates an empty library, CREATE SCHEMA creates a library plus objects needed for automatic journaling and a dozen or so SQL system views.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.