Name

TRUNCATE-DATABASE — Drop all tables, views, indexes and sequences in a database.Function

Syntax

      truncate-database &key database => 

Arguments and Values

database

A database object. This will default to the value of *default-database*.

Description

Drop all tables, views, indexes and sequences in database which defaults to *default-database*.

Examples

(list-tables)
=> ("type_table" "type_bigint" "employee" "company" "addr" "ea_join" "big")
(list-indexes)
=> ("employeepk" "companypk" "addrpk")
(list-views)
=> ("lenins_group")
(list-sequences)
=> ("foo" "bar")
(truncate-database)
=> 
(list-tables)
=> NIL
(list-indexes)
=> NIL
(list-views)
=> NIL
(list-sequences)
=> NIL
      

Side Effects

Modifications are made to the underlying database.

Affected by

None.

Exceptional Situations

Signals an error of type sql-database-error if database is not a database object.

See Also

drop-table
drop-view
drop-index
drop-sequence

Notes

truncate-database is a CLSQL extension.