问题描述:一同事误将“describe”关键字放入建表语句中,虽成功建表,但因未关键词的缘故,无法插入数据.故需将字段drop并换为非关键字的字段. 解决过程: 按常规删除字段语句操作报错,语句如下: ALTER TABLE interestedhobbies DROP COLUMN describe; 经查询得知,mysql删除“关键字”字段时,需给关键字加上“反引号”,看清了,是反引号,而不是单引号.语句如下: ALTER TABLE interestedhobbies DROP COLUM
/* Navicat MySQL Data Transfer Source Server : rm-m5e3xn7k26i026e75o.mysql.rds.aliyuncs.com Source Server Version : 50629 Source Host : rm-m5e3xn7k26i026e75o.mysql.rds.aliyuncs.com:3306 Source Database : base Target Server Type : MYSQL Target Server
章节 Python MySQL 入门 Python MySQL 创建数据库 Python MySQL 创建表 Python MySQL 插入表 Python MySQL Select Python MySQL Where Python MySQL Order By Python MySQL Delete Python MySQL 删除表 Python MySQL Update Python MySQL Limit Python MySQL Join 删除表 可以使用"DROP table&quo
mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_schema select * from columns where table_name='表名'; 顺便记下: show databases; use 数据库名; show tables; 原有一unique索引AK_PAS_Name(PAC_Name)在表tb_webparamcounter中,
登录数据库服务器 mysql -h127.0.0.1 -uroot -p123456 创建数据库 create database test; 显示所有数据库 show databases; 指定要操作的数据库 use test; 删除库 drop database test; 创建表 create table demo( id int primary key auto_increment, name char(30) not null )engine=innodb default charset