说明:你通过以下语句,创建了一个数据库视图:
create view entities_entity as
select id, name from entities_hero
union
select 10000+id as id, name from entities_villain
它包含所有Hero和Villain对象的名称。Villain对象的的ID被设置都加上10000,因为Hero对象的数量不会超过这个数字。
sqlite> select * from entiti <weixin_38649657> 上传 | 大小:48kb
说明:在使用pycharm开发工具连接mysql数据库时提示错误,信息如下:
Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
提示信息返回无效的时区,这是由于MySQL默认的时区是UTC时区,比北京时间晚8个小时。
解决的方法是修改mysql时区的时长,连接上mysql后,操作命令如下:
set global time_zone=’+8:00′;
但可能 <weixin_38621272> 上传 | 大小:71kb