__main__:1: Warning: Unknown table 'employ' 0L

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介: __main__:1: Warning: Unknown table 'employ' 0Lfrom warnings import filterwarningsimport MySQLdbfilterwarnings('ignore', category = MySQLdb.

__main__:1: Warning: Unknown table 'employ' 0L

from warnings import filterwarnings
import MySQLdb filterwarnings('ignore', category = MySQLdb.Warning)


#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import MySQLdb
from warnings import filterwarnings
filterwarnings('ignore',category = MySQLdb.Warning)

#打开数据库连接
db = MySQLdb.connect("localhost","root","","ruiy")
#使用cursor()方法获取操作游标
cursor = db.cursor();
#如果数据表已经存在使用execute()方法删除表
cursor.execute("drop table if exists employee")
#创建数据表SQL语句
sql = """create table employee (
        first_name char(20) not null,
        last_name char(20),
        age int,
        sex char(1),
        income float )"""

cursor.execute(sql)
db.close()

 

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
SQL Oracle 关系型数据库
ORA-00600: internal error code, arguments: [kcbz_check_objd_typ_3], [0], [0], [1], [], [], [], []
故障现象:     在查询wwl005这张表的时候,报内部错误,对于这张表我们刚才是做了不一致性恢复,之后在查询报如下错误,对于这种现象一般都是由于bug或坏块引起。
1659 0
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
172 0
|
9月前
|
编解码 数据处理
解决办法:error: unknown type name ‘__int64‘
解决办法:error: unknown type name ‘__int64‘
519 0
|
Android开发
Error:Failed to complete Gradle execution. Cause: Unknown command-line option '-X'解决方法
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010046908/article/details/55050050 今天新建android studio项目时候。
1926 0
|
SQL 数据库
ORA-00600: internal error code, arguments: [kcratr1_lastbwr], [], [], [], [], [], [], []
今天在PlateSpin Forge(关于PlateSpin相关介绍,请见最下面部分简单介绍) 复制出来的一台数据库服务器上,测试数据库能否正常启动时,遇到了“ORA-00600: internal error code, arguments: [kcratr1_lastbwr], [], ...
1364 0
|
Oracle 关系型数据库 数据库
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr]错误处理
机器断电以后,重新启动报如下错误: [oracle@zhuxg ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.
1209 0

热门文章

最新文章