scala函数高级操作 一.字符串高级操作 多行字符串和插值 package top.ruandb.scala.Course06 object StringApp { def main(args: Array[String]): Unit = { val str = """ |这是一个多行字符串 |hello |lucy |lallalla """.stripMargin val say ="hello" val name =…
Linux,一起学习进步- mkdir The mkdir command is used to create directories.It works like this: mkdir命令是用来创建目录的,这样使用: mkdir directory… A note on notation: When three periods follow an argument in the description of a command(as above),it means that the ar…
MySQL高级操作(上) 一.MySQL表复制 create table t2 like t1; #复制表结构,t2可以学习到t1所有的表结构 insert into t2 select * from t1; #复制表数据,但是这样还是会有缺陷,因为没有考虑到列的对应,因为t1与t2的表结构完全一致,所以此次操作才不会出错! 建议: insert into t3(name) select name from t1; #指定复制的列 二.MySQL索引 1.直接创…
MySQL高级操作(下) 五.MySQL预处理语句 1.设置预处理stmt,传递一个数据作为where的判断条件 prepare stmt from "select * from table_name where id > ?"; 2.设置一个变量 set @i = 1; 3.执行预处理语句 execute stmt using @i; 4.删除预处理指令 drop prepare stmt; 六.MySQL事务处理 [注意]MyISAM存储引擎对事务并不支持,应该使用InnoD…