1.向MySQL数据表插入数据
语法:insert into 表名(字段1,字段2......) values(值1,值2.....);
如果数据是字符型,必须使用单引号或者双引号,如:"值1"。
新建一个数据库students和名为student的表如下:
create database if not EXISTS students character set utf8 collate utf8_general_ci;
use students; create table student ( stuID int(5) not null primary key, stuName varchar(50) not null, stuSex CHAR(10), stuAge smallint );
例1:向student表添加一行记录
insert into student(stuID,stuName,stuSex,stuAge) values(1001,'张三','男',19); select * from student;
标签:stuSex,删除,students,into,添加,student,MySQL From: https://www.cnblogs.com/YorkZhangYang/p/16803740.html