diff --git a/数据库/MariaDB_Centos7安装mariadb,支持远程访问.md b/数据库/MariaDB/MariaDB_Centos7安装mariadb,支持远程访问.md similarity index 100% rename from 数据库/MariaDB_Centos7安装mariadb,支持远程访问.md rename to 数据库/MariaDB/MariaDB_Centos7安装mariadb,支持远程访问.md diff --git a/数据库/PostgreSQL_pg_hba.conf.md b/数据库/PostgreSQL/PostgreSQL_hba配置.md similarity index 100% rename from 数据库/PostgreSQL_pg_hba.conf.md rename to 数据库/PostgreSQL/PostgreSQL_hba配置.md diff --git a/数据库/PostgreSQL_postgresql删除还有活动连接的数据库.md b/数据库/PostgreSQL/PostgreSQL_postgresql删除还有活动连接的数据库.md similarity index 100% rename from 数据库/PostgreSQL_postgresql删除还有活动连接的数据库.md rename to 数据库/PostgreSQL/PostgreSQL_postgresql删除还有活动连接的数据库.md diff --git a/数据库/PostgreSQL_systemctl start postgresql-12.service -- 启动服务.md b/数据库/PostgreSQL/PostgreSQL_systemctl start postgresql-12.service -- 启动服务.md similarity index 100% rename from 数据库/PostgreSQL_systemctl start postgresql-12.service -- 启动服务.md rename to 数据库/PostgreSQL/PostgreSQL_systemctl start postgresql-12.service -- 启动服务.md diff --git a/数据库/PostgreSQL/PostgreSQL删除数据库.md b/数据库/PostgreSQL/PostgreSQL删除数据库.md new file mode 100755 index 0000000..2ec06b6 --- /dev/null +++ b/数据库/PostgreSQL/PostgreSQL删除数据库.md @@ -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;` +``` \ No newline at end of file diff --git a/数据库/PostgreSQL_Pg12 安装过程.md b/数据库/PostgreSQL/PostgreSQL安装.md similarity index 100% rename from 数据库/PostgreSQL_Pg12 安装过程.md rename to 数据库/PostgreSQL/PostgreSQL安装.md diff --git a/数据库/PostgreSQL_Postgresql 帐号密码修改方法.md b/数据库/PostgreSQL/PostgreSQL密码修改.md similarity index 100% rename from 数据库/PostgreSQL_Postgresql 帐号密码修改方法.md rename to 数据库/PostgreSQL/PostgreSQL密码修改.md diff --git a/数据库/SQL SERVER 游标使用.md b/数据库/SQLServer/SQL SERVER 游标使用.md similarity index 100% rename from 数据库/SQL SERVER 游标使用.md rename to 数据库/SQLServer/SQL SERVER 游标使用.md diff --git a/数据库/SQLSERVER 数据库恢复挂起的解决办法.md b/数据库/SQLServer/SQLSERVER 数据库恢复挂起的解决办法.md similarity index 100% rename from 数据库/SQLSERVER 数据库恢复挂起的解决办法.md rename to 数据库/SQLServer/SQLSERVER 数据库恢复挂起的解决办法.md diff --git a/数据库/SQLSERVER存储过程基本语法.md b/数据库/SQLServer/SQLSERVER存储过程基本语法.md similarity index 100% rename from 数据库/SQLSERVER存储过程基本语法.md rename to 数据库/SQLServer/SQLSERVER存储过程基本语法.md diff --git a/数据库/链接服务器远程查询.md b/数据库/链接服务器远程查询.md deleted file mode 100755 index 0817502..0000000 --- a/数据库/链接服务器远程查询.md +++ /dev/null @@ -1 +0,0 @@ -> \ No newline at end of file diff --git a/数据库/附加数据库.md b/数据库/附加数据库.md deleted file mode 100755 index db4f31f..0000000 --- a/数据库/附加数据库.md +++ /dev/null @@ -1,3 +0,0 @@ -```sql -exec sp_attach_single_file_db @dbname='ZHDMTProj_SX',@physname='F:\DataBases\ZHDMTProj_SX.mdf' -``` \ No newline at end of file