搜尋此網誌

2021年1月5日 星期二

MySQL指令

匯出database
mysqldump -u帳號 -p密碼 資料庫 > script.sql


匯入database
mysql -u帳號 -p密碼 資料庫 < script.sql

Windows常用網路管理指令

清除DNS解析快取
ipconfig /flushdns

2020年9月22日 星期二

重置IntelliJ IDEA試用期限

C:
cd "C:%HOMEPATH%\.IntelliJIdea*\config"
rmdir "eval" /s /q
del "options\other.xml"
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f


2020.1後的版本
C:
cd "C:%HOMEPATH%\AppData\Roaming\JetBrains\IntelliJIdea*"
rmdir "eval" /s /q
del "options\other.xml"
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f


強烈建議購買正版授權,此方法只適用延長試用期限

2020年8月27日 星期四

常用Git指令

強制push
git push -f


移除已被Git追蹤的檔案
1.專案目錄下git rm -r --cached .
2.修改.gitignore
3.執行git add .

2020年8月24日 星期一

Oracle指令

複製schema和data
create table new_table as select * from old_table;


複製指定欄位data
insert into new_table(column1column2) select (column1column2) from old_table;


跨database複製table
copy from username/password@ip:port/service to username/password@ip:port/service create table using select * from table;


*注意Table Engine和Character Set

2020年5月27日 星期三

MySQL快速複製Table

複製schema
create table new_table like old_table;


複製data

insert into new_table select * from old_table;


複製schema和data
select * into new_table  from old_table;


複製指定欄位data
insert into new_table(column1, column2) select (column1, column2) from old_table;


*注意Table Engine和Character Set