e251. getting rows from a database table.txt

来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 9 行

TXT
9
字号
A SQL SELECT query is used to get data from a table. The results of the select query is called a result set. This example executes a SQL SELECT query and creates a result set. See also e252 Getting Data from a Result Set. 
    try {
        // Create a result set containing all data from my_table
        Statement stmt = connection.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM my_table");
    } catch (SQLException e) {
    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?