MySQL和SQLite在SQL中的差异 [英] MySQL and SQLite differences in SQL

查看:149
本文介绍了MySQL和SQLite在SQL中的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写同时使用 JDBC和 SQLite MySQL 的Java应用程序.

I'm writing java application that is using both SQLite and MySQL using JDBC.

这些数据库的 SQL 是否有任何区别?是否可以对 SQLite MySQL 使用相同的查询,或者是否有任何特定于数据库的东西,而在其他数据库上却不起作用?

Are there any differences in SQL for those databases? Can I use same queries for both SQLite and MySQL, or is there any db specific stuff, that doesn't work on the other one?

到目前为止,我只使用 MySQL ,所以我对 SQLite 的了解不多.

As far I've worked only with MySQL, so I don't really know much about SQLite.

推荐答案

如果您坚持使用 ANSI SQL92 ,您会没事的.

If you stick to ANSI SQL92, you'll should be fine.

MySQL和SQLite都缺少一些SQL92功能(例如FULL OUTER JOIN). MySQL同时具有RIGHT JOIN和LEFT JOIN,SQLite只有LEFT JOIN. SQLite不支持FOREIGN KEY约束,带有MyISAM表的MySQL也不支持. SQLite当然没有GRANT/REVOKE,因为权限系统基于底层操作系统的文件权限.

There are some SQL92 features missing from both MySQL and SQLite (e.g. FULL OUTER JOIN). MySQL has both RIGHT JOIN, and LEFT JOIN, SQLite only the LEFT JOIN. SQLite doesn't support FOREIGN KEY constraints, neither does MySQL with MyISAM tables. SQLite of course doesn't have GRANT/REVOKE, as permission system is based on underlying OS's file permissions.

这篇关于MySQL和SQLite在SQL中的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆