clob 对应四种类型 ,TINYTEXT , TEXT , MEDIUMTEXT , LONGTEXT
2的8次方 2的16次方 2的24次方 2的32次方
blob 对应四种类型 . TINYBLOB , BLOB , MEDIUMBLOB , LONGBLOB
clob
create table testclob(id integer primary key auto_increment , content text);
blob
create tabke testblob(id integer primary key auto_increment , image blog);
package com.zly.test;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class Test {
public static void main2(String[] args) {
Connection connection = null;
PreparedStatement psmt = null;
BufferedInputStream bis = null;
try {
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql: