Part.1 关键代码 var s = "天气"; // 需要匹配的字符 var reg = new RegExp("(" + s + ")", "g"); // 形成正则规则 var str = "天气真好,可以出去玩玩"; // 全部字符 var newstr = str.replace(reg, "<font color=red>$1</font>"); /
一: A.子查询: 1.select 字段名 from table where 字段名=(select 字段名 from table 条件) //只能做1个匹配 2.select 字段名 from table where 字段名 in(select 字段名 from table 条件或指定的字段值) B.连接查询:使用关键字 on table 1.inner jion:select 字段名 from table1 inner join table2 on table1.字段名=table2.字
与后台联调页面,经常会验证数据正确性,这时候就需要会点SQL语句,以下是常用的SQL: 单表查询 select * from table 条件查询 select * from table where fieid='33214047251857409' LIKE 查询 "%" 可用于定义通配符(模式中缺少的部分),这句SQL是模糊查询值的前端带有'33214047251'. select * from table where fieid LIKE '33214047251%' NOT 查
Microsoft SQL Server 数据查询 单表查询所有列 --查询所有行所有列 select all * from table; --查询不重复行的所有列 select distinct * from table; --查询前n行所有列 select top n * from table; --查询前n%行所有列 select top n percent * from table; 单表查询部分列 --查询所有行部分列 select all 列1,列n from table; --查询