R学习之一

1、安装RODBC

 install.packages("RODBC")

如果不成功就使用:

  install.packages('RODBC', repos = 'http://streaming.stat.iastate.edu/CRAN/') 
2、导包library(RODBC)

3、数据库连接

con<-odbcConnect("orcl",uid="scott",pwd="tiger")

4、查询数据

 tables<- sqlQuery(con,"select * from user_tables")


附:win7 64 位Oracle odbc的安装

找到文件

C:\Windows\SysWOW64\odbcad32.exe

点开安装

猜你喜欢

转载自blog.csdn.net/xumajie88/article/details/38353615