urQL/docs/drop.md

59 lines
1.3 KiB
Markdown
Raw Normal View History

2022-08-14 04:30:15 +03:00
`DROP DATABASE [ FORCE ] <database-name>`
2022-08-10 21:45:17 +03:00
Discussion:
2022-08-14 04:30:15 +03:00
Only succeeds when no *populated* tables exist in it unless `FORCE` is specified.
2022-08-06 17:06:18 +03:00
### _______________________________
2022-08-10 23:23:12 +03:00
```
DROP INDEX <index-name>
ON [ <db-qualifer> ] { <table-name> | <view-name> }
```
2022-08-10 21:45:17 +03:00
Discussion:
Cannot drop indices whose names begin with "pk-", as these are table primary keys.
### _______________________________
2022-08-14 04:30:15 +03:00
`DROP NAMESPACE [ FORCE ] [ <database-name>. ]<namespace-name>`
2022-08-10 21:45:17 +03:00
Discussion:
2022-08-14 04:30:15 +03:00
Only succeeds when no tables or views are in the namespace, unless `FORCE` is specified, possibly resulting in cascading object drops described in `DROP TABLE`.
2022-08-10 21:45:17 +03:00
Cannot drop namespaces *dbo* and *sys*.
2022-08-06 17:06:18 +03:00
### _______________________________
2022-08-14 04:30:15 +03:00
`DROP TABLE [ FORCE ] [ <db-qualifer> ] { <table-name> }`
2022-08-06 17:06:18 +03:00
2022-08-10 21:45:17 +03:00
Discussion:
2022-08-14 04:30:15 +03:00
Cannot drop if used in a view or foreign key, unless `FORCE` is specified, resulting in cascading object drops.
2022-08-06 17:06:18 +03:00
### _______________________________
2022-08-10 23:23:12 +03:00
```
DROP TRIGGER
[ <db-qualifer> ] { <trigger-name> }
ON { <table-name> | <view-name> }
```
2022-08-06 17:06:18 +03:00
2022-08-10 21:45:17 +03:00
### _______________________________
2022-08-06 17:06:18 +03:00
`DROP TYPE <type-name>`
2022-08-10 21:45:17 +03:00
TBD
Discussion:
Cannot drop if type-name is in use.
2022-08-06 17:06:18 +03:00
### _______________________________
2022-08-10 21:45:17 +03:00
`DROP VIEW [ <db-qualifer> ] <view-name>`
2022-08-06 17:06:18 +03:00
2022-08-14 04:30:15 +03:00
Discussion: Cannot drop if view is in use by another view,