Created
June 3, 2020 17:10
-
-
Save luxiaochen0/013b570f547c4e0459b8e5a0a52501e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Connection con=DriverManager.getConnection("jdbc:mysql://192.168.99.101:3306/lshop?useUnicode=true&characterEncoding=UTF-8","root","123456"); | |
| Statement stmt=con.createStatement(); | |
| ResultSet rs =stmt.executeQuery("select * from goods"); | |
| while (rs.next()){ | |
| System.out.println(rs.getInt(1)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment