02 2022 档案
摘要:常见语法 content = '''苹果是绿色的 橙子是橙色的 香蕉是黄色的 乌鸦是黑色的''' import re p = re.compile(r'.色') for one in p.findall(content): print(one) 运行结果如下 字符串前+r表示对字符串不进行任何pyt
阅读全文
摘要:外键特点 操作外键约束 create database mydb3;use mydb3;-- 创建部门表,主表create table if not exists dept(deptno varchar(20) PRIMARY key,#部门号name varchar(20)#部门名字);-- 创建
阅读全文
摘要:-- ^在字符串开始处进行匹配,结果为1表示为真,成功SELECT 'abc' REGEXP '^a';select * from product where pname regexp '^海';-- $在字符串末尾开始匹配SELECT 'abc' REGEXP 'a$';SELECT 'abc'
阅读全文
摘要:-- 1.数据准备-- 1.创建数据库create database if not exists mydb2;use mydb2;-- 2.创建商品表:create table product(pid int primary key auto_increment,-- 商品编号pname varch
阅读全文