Java教程

sqlsqlsqlsql

本文主要是介绍sqlsqlsqlsql,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
select * from mid_order_user m left join order_tab o on o.id=m.o_id left join order_user u on u.id=m.u_id 
truncate table order_tab
truncate table order_user
delete from order_user
truncate table mid_order_user
show create table order_user
show create table order_tab
alter table mid_order_user default character set utf8;
select * from order_user;
select * from order_tab;
drop table order_user;
drop table order_tab;
ALTER TABLE order_user AUTO_INCREMENT=1
CREATE TABLE `order_user` (
  `id` int(11) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `password` varchar(25) CHARACTER SET utf8mb4 DEFAULT NULL,
  `remark` varchar(225) CHARACTER SET utf8mb4 DEFAULT NULL,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `order_order` (
  `id` int(11) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `type` varchar(25) CHARACTER SET utf8mb4 DEFAULT NULL,
  `birthaddr` varchar(225) CHARACTER SET utf8mb4 DEFAULT NULL,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

select * from mid_order_user m left join order_order o on o.id=m.o_id left join order_user u on u.id=m.u_id
这篇关于sqlsqlsqlsql的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!