Advertisement
rey13

RMySQL in Anaconadas Ipython

Sep 3rd, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. library(RMySQL)
  2. library(DBI)
  3. con = dbConnect(MySQL(),
  4. user="root", password="rey13",
  5. dbname="reydata", host="localhost")
  6. dbListTables(con)
  7. resut=dbSendQuery(con,"select * from students")
  8. data.students=fetch(resut,n=3)
  9. print(data.students)
  10. *******************************************************
  11. 'contacts' 'students'
  12. Warning message in .local(conn, statement, ...):
  13. "Unsigned INTEGER in col 0 imported as numeric"
  14. id_student name_student surname_student email
  15. 1 1 rey montero rey@domain.com
  16. 2 2 noela claire garcia claire@domain.com
  17. 3 3 mark joseph garcia markjoseph@domain.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement