如果对空的sqlite数据库执行select语句,结果是null还是会引发异常? [英] If a select statement is executed against an empty sqlite database, will the result be a null or will it throw an exception?

查看:158
本文介绍了如果对空的sqlite数据库执行select语句,结果是null还是会引发异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果对空的sqlite3数据库执行select语句,结果是null还是会抛出异常?

我在文档中找到任何明确说明此内容的内容这对我来说非常重要。

If a select statement is executed against an empty sqlite3 database, will the result be a null or will it throw an exception?
I kind find anything in the documentation that says something explicit about this and it is very important to me.

推荐答案

请阅读我对这个问题的评论。



如果通过说数据库,你的意思是表,你将获得 NULL 。如果说数据库你的意思是数据库(没有表),你会得到一个例外。
Please, read my comment to the question.

If by saying database, you mean table, you'll get NULL. If by saying database you mean database (there is no table), you'll get an exception.


这篇关于如果对空的sqlite数据库执行select语句,结果是null还是会引发异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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