Links
Comment on page

数据库

Oracle

记录oracle sql plus 执行时所有的输入输出:

spool d:\xx.txt
SQL statement
spool off (关闭)

MySQL

MySQL err 150

  • 十个可能引起mysql 外键错误的原因:
  • MySql默认charset是瑞典的,应该这样修改:
    ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    ALTER TABLE db_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

MongoDB

# 启动mongodb后端
mongod
# 连接mongodb
mongo
mongodb://user:psw@ip[:port]/dbname
# 查看与切换数据库(不存在会创建),展示所有的文档
show dbs
use reid
db.getCollectionNames()
# 查询文档(传统意义的表)
db.col_name.find()