[FB] drop bazy pod warunkiem...

0

Cześć, czy jest możliwe zrobienie jednym poleceniem sql, żeby usunąć bazę, ale tylko jeśli nie ma w niej żadnych rekordów?

0

nie

0
Misiekd napisał(a)

nie

Sorry, o tabelę mi chodziło

0

też się nie da jednym poleceniem - możesz sobie procedurę napisać

BTW

DROP TABLE
Removes a table from a database. Available in SQL, DSQL, and isql.
Syntax DROP TABLE name;
IMPORTANT In SQL statements passed to DSQL, omit the terminating semicolon. In embedded applications written in C and C++, and in isql, the semicolon is a terminating symbol for the statement, so it must be included.
Description DROP TABLE removes a table’s data, metadata, and indexes from a database. It also drops any triggers that reference the table.
A table referenced in an SQL expression, a view, integrity constraint, or stored procedure cannot be dropped. A table used by an active transaction is not dropped until it is free.
Note When used to drop an external table, DROP TABLE only removes the table definition from the database. The external file is not deleted.
A table can be dropped by its creator, the SYSDBA user, or any user with operating system root privileges.
Example The following embedded SQL statement drops a table:
EXEC SQL
DROP TABLE COUNTRY;
See Also ALTER TABLE, CREATE TABLE

1 użytkowników online, w tym zalogowanych: 0, gości: 1