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

执行脚本文件的方式

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

你可能感兴趣的:(数据库,数据库)