Update from Sync Service
This commit is contained in:
7
数据库/PostgreSQL/PostgreSQL删除数据库.md
Executable file
7
数据库/PostgreSQL/PostgreSQL删除数据库.md
Executable file
@@ -0,0 +1,7 @@
|
||||
```sql
|
||||
select `pg_terminate_backend(pid)` from `pg_stat_activity` where `datname`='testdb' and `pid`<>`pg_backend_pid();`
|
||||
```
|
||||
==上面sql表示的是关闭数据库testdb的活动连接,接下来就可以用==
|
||||
```sql
|
||||
drop database `testdb;`
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||
>
|
||||
@@ -1,3 +0,0 @@
|
||||
```sql
|
||||
exec sp_attach_single_file_db @dbname='ZHDMTProj_SX',@physname='F:\DataBases\ZHDMTProj_SX.mdf'
|
||||
```
|
||||
Reference in New Issue
Block a user