insert into products(prod_id,prod_name,pro_price)values('avno1','.5 ton anvil',5.99); |
深入理解: select * from student; ------------------------------------------select t.sid+1 'tsid加了1', t.sid+5, t.score+100, t.sid+t.score as 'sid_score', t.*, 5*8 '五' from student t; ------------------------------------------ select t.sid, t.sname, from student t; ------------------------------------------ t.sid, t.sname, 5, ------------------------------------------ select t.sid +1, t.sname, t* ------------------------------------------ select t.score+t.ccid from student t; ------------------------------------------ select -- 'ni'列名 t.score 'ni', -- 'why'列名 t.ccid 'why', -- 'you'列名 ------------------------------------------ select t.score+t.sname from student t; ------------------------------------------ select t.score '我' from student t; ------------------------------------------ select t.score '加', 5 ‘王’ from student t; ------------------------------------------ select t.score '加', from student t ------------------------------------------ select s.score+5 'q',s.score+s.ccid,5 '我' from student s; select -- '加'列名 5 , -- t.ccid+5列名相加的数据 ------------------------------------------ select * from student t where t.score>70 order by t.score desc limit 5; ------------------------------------------ ------------------------------------------ select * from student;------------------------------------------ create table student (id int not null auto_increment, primary key(id) )engine = innodb; ------------------------------------------ alter table student add sname char(40); alter table student add score int; alter table student add ccid int; ------------------------------------------ insert into student(sname,score,ccid) values('wpq2',93,1); insert into student(sname,score,ccid) values('wpq3',45,1);insert into student(sname,score,ccid) values('5',43,1); insert into student(sname,score,ccid) values('wp9',60,1); insert into student(sname,score,ccid) values('w',99,1); insert into student(sname,score,ccid) values('w123',91,1); |

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/97424.html