四种数据库执行脚本文件导入数据的方式

执行脚本文件的方式

Mysql

mysql执行sql脚本文件的方法:

1、在命令行输入mysql -uroot -h10.235.5.55 -p'123456' -P3306 < F:\hello\niuzi.sql

2、在命令行输入【source F:\hello\niuzi.sql】

mysql -uroot -h10.235.5.55 -p'123456' -P3306 -e "source test.sql " > test.log

Postgresql

psql -Upostgres -dzxin -h10.235.5.55 -p6789 -f test.sql >> upgrade.log

Sybase

isql -Uzxin_smap -P'123456' -i ./test.sql -o test.log

oracle

echo 'quit'| sqlplus zxin_smap/'123456' @test.sql > wpp.log

相关推荐
今晚务必早点睡6 小时前
微服务改数据库密码后服务仍能访问?一次“看似异常、实则常见”的生产现象全解析
数据库·微服务·oracle
老师我太想进步了20268 小时前
cmd连接MySQL及相关查询
数据库·mysql
難釋懷11 小时前
Redis命令-Set命令
数据库·redis·缓存
Linux-palpitate11 小时前
PostgreSQL(PG)的1主2从集群部署安装
数据库·postgresql
heartbeat..12 小时前
数据库基础知识体系:概念、约束、范式与国产产品
java·数据库·学习笔记·国产数据库
山峰哥12 小时前
数据库工程核心:SQL调优让查询效率飙升的实战密码
网络·汇编·数据库·sql·编辑器
Coder_Boy_13 小时前
基于SpringAI的在线考试系统-DDD业务领域模块设计思路
java·数据库·人工智能·spring boot·ddd
小雪_Snow13 小时前
Windows 安装 MySQL 8.0 教程【安装包方式】
数据库·mysql
无敌的牛13 小时前
MySQL初阶
数据库·mysql
不会C++的雾14 小时前
Linux操作系统(2)
linux·数据库·mysql