⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e295. exporting a mysql table to a flat file.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
The default format of a file exported from MySQL is as follows: the fields are separated by tabs, the lines terminated by '\n', and backslashes(\), newlines (\n), and tabs (\t) escaped by a backslash. NULL is exported as \N. 
This example exports the data in a table called mysql_table2 to a file named outfile.txt. 

    try {
        // Create the statement
        Statement stmt = connection.createStatement();
    
        // Export the data
        String filename = "c:\\\\temp\\\\outfile.txt";
        String tablename = "mysql_2_table";
        stmt.executeUpdate("SELECT * INTO OUTFILE \"" + filename + "\" FROM " + tablename);
    } catch (SQLException e) {
    }

⌨️ 快捷键说明

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