1.创建存储过程
USE [test] GO CREATE PROCEDURE findAllBooks AS BEGIN SELECT * from tb_books END GO
2.调用存储过程
CallableStatement cs = connection.prepareCall("{call findAllBook()}"); ResultSet resultSet = cs.executeQuery();