2014-12-03から1日間の記事一覧
CSVファイルをカンマ区切りでだしたいとき。 mysql -uユーザ名 -pパスワード -e "SQL文" | sed -e "s/\t/,/g" > .outputFile.csv
次のSQL文は、「select * from DB名.テーブル名 where col1='2013-12-31' and col2='3:00:00'」を実行した結果が存在しない場合に、「select *」を実行する。 select * from DB名.テーブル名 where not exists (select * from DB名.テーブル名 where col1='2…