1、mysql中创建测试表,create table test_user(id int, name varchar(20))
2、插入测试数据,
insert into test_user values(1001,'jack')
insert into test_user values(1002,'lucy')
insert into test_user values(1003,'mike')
insert into test_user values(1004,'john')
insert into test_user values(1005,'may')
3、查看表中所有数据,select * from test_user
4、编写sql,查询name列是否有jack名,
select * from test_user t where name = 'jack'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)