MYSQL
调用存储过程ERROR 1436 (HY000): Thread stack overrun
注释掉thread_stack = 128K 或者加大128K
1.登录数据库
>mysql -u root -p 数据库名称
2.查询所有数据表
>show tables;
3.查询表的字段信息
>desc 表名称;
>show full columns from t1;
4.1添加表字段
alter table table1 add transactor varchar(10) not Null;
alter table table1 add id int unsigned not Null auto_increment primary key
4.2.修改某个表的字段类型及指定为空或非空
>alter table 表名称 change 字段名称 字段名称 字段类型 [是否允许非空];
>alter table 表名称 modify 字段名称 字段类型 [是否允许非空];
4.3.修改某个表的字段名称及指定为空或非空
>alter table 表名称 change 字段原名称 字段新名称 字段类型 [是否允许非空
4.4如果要删除某一字段,可用命令:ALTER TABLE mytable DROP 字段 名;
改变存储引擎
ALTER TABLE table_name ENGINE=InnoDB
<input type=button onClick="FILE.click();file_text.value=FILE.value;" value="浏览..."/>
文件浏览器
JFileChooser jFileChooser = new JFileChooser();
jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
jFileChooser.setDialogTitle("打开文件夹");
int ret = jFileChooser.showOpenDialog(null);
if (ret == JFileChooser.APPROVE_OPTION) {
// 文件夹路径
string = jFileChooser.getSelectedFile().getAbsolutePath();
fileXIEpath = string;
System.out.println(jFileChooser.getSelectedFile().getAbsolutePath());
}
2
JFileChooser dialog = new JFileChooser();
File file = new File("新建 Microsoft Excel 工作表.csv");
dialog.setSelectedFile(file);
dialog.setDialogTitle("另存为");
dialog.setFileSelectionMode(JFileChooser.FILES_ONLY);
dialog.setDialogType(JFileChooser.SAVE_DIALOG);
dialog.setFileFilter(new TextFileFilter("*.txt", "文本文档(*.txt)"));
int result = dialog.showSaveDialog(dialog);
if(result == JFileChooser.APPROVE_OPTION){
File file2 = dialog.getSelectedFile();
System.out.println(file2.getAbsolutePath());; //得到文件全名
new File(file2.getAbsolutePath()).renameTo(new File("E:\\"));
}