摘要: -- 1. 联合查询union select * FROM eb_store_product where store_name like "%品%" UNION select * from eb_store_product where store_name like "%1%" UNION 语句:用 阅读全文
posted @ 2020-10-17 13:48 谢凌 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 在 SQL 中,我们有如下约束: NOT NULL - 指示某列不能存储 NULL 值。 UNIQUE - 保证某列的每行必须有唯一的值。 PRIMARY KEY - NOT NULL 和 UNIQUE 的结合。确保某列(或两个列多个列的结合)有唯一标识,有助于更容易更快速地找到表中的一个特定的记录 阅读全文
posted @ 2020-10-17 13:46 谢凌 阅读(315) 评论(0) 推荐(0) 编辑
摘要: select into from 和 insert into select 都是用来复制表 两者的主要区别为: select into from 要求目标表不存在,因为在插入时会自动创建;insert into select from 要求目标表存在。 1. 复制表结构及其数据: create ta 阅读全文
posted @ 2020-10-17 10:11 谢凌 阅读(938) 评论(0) 推荐(0) 编辑