摘要: 1.复制表结构: create table newName like oldName;//可以复制所有结构。 或者: create table newName select * from oldName where 1<>1;//让where条件不成立,只能拷贝结构,无法拷贝内容,且外键约束 、主键 阅读全文
posted @ 2018-05-22 12:19 Bronze-y 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1.备份一个数据库 mysqldump -h localhosot -uroot -ppassword 数据库名>数据库所在路径(路径+数据库名.sql) 注意:导出的数据库文件.sql文件不能提前创建;数据库所在路径可用相对路径('\')。 2.还原一个数据库 mysql -h localhost 阅读全文
posted @ 2018-05-21 15:45 Bronze-y 阅读(742) 评论(0) 推荐(0) 编辑
摘要: MySQL不允许远程登录,所以远程登录失败了,解决方法如下: 执行FLUSH PRIVILEGES; 阅读全文
posted @ 2018-05-19 09:07 Bronze-y 阅读(210) 评论(0) 推荐(0) 编辑
摘要: public class Student { String school; String name; int age; public Student (String name,int age,String s){this.name=name; this.age=age; this.school=s; 阅读全文
posted @ 2018-05-18 09:18 Bronze-y 阅读(231) 评论(1) 推荐(1) 编辑
摘要: public class MaoPao { public static void main(String []args){ int []s={1,4,2,5,3,6,7}; int temp; for(int i=0;i<s.length-1;i++){ for(int j=0;j<s.length 阅读全文
posted @ 2018-05-14 08:50 Bronze-y 阅读(229) 评论(0) 推荐(1) 编辑
摘要: import java.util.ArrayList;import java.util.Iterator;import java.util.List; public class For{ public static void main(String[]args) { //new一个集合对象 List 阅读全文
posted @ 2018-05-13 15:31 Bronze-y 阅读(8624) 评论(0) 推荐(0) 编辑
摘要: import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Calendar; public class NianLi { public stat 阅读全文
posted @ 2018-05-13 15:07 Bronze-y 阅读(209) 评论(0) 推荐(0) 编辑