📄 e251. getting rows from a database table.txt
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -