例如: CREATE TRIGGER del_vendor AFTER DELETE ON vendors FOR EACH ROW INSERT INTO sqllogs VALUES(NULL,old.vend_name,CURRENT_USER,CONCAT(CURRENT_DATE,' ',CURRENT_TIME)); 例子中sqllogs表的建表语句: CREATE TABLE sqllogs( thread_id INT NOT NULL auto_increment, thread_name CHAR(50), oper_user CHAR(50) NOT NULL, oper_date datetime NOT NULL, PRIMARY KEY (thread_id) )ENGINE=INNODB; SELECT * FROM customers; SET new.vend_zip='250001';
ES6几个好用的字符串操作方法 字符串查找 let a = 'liuyuanwai'; let b = 'ES6几个好用liuyuanwai的字符串操作'; document.write(b.includes(a)) 判断是否在开头 let a = 'liuyuanwai'; let b = 'ES6几个好用liuyuanwai的字符串操作'; document.write(b.startsWith(a)) 判断是否在结尾 let a = 'liuyuanwai'; let b = 'ES6几个好用liuyuanwai的字符串操作'; document.write(b.endsWith(a)) 复制字符串 document.write('liuyuanwai-'.repeat(5));
ES6几个好用的数字操作方法 判断是否为数字 let a = 1; console.log(Number.isFinite(a)) 判断是否为整数 let a = 111.11; console.log(Number.isInteger(a)) 判断是否为浮点数 let a = 111.11; console.log(!Number.isInteger(a)) 将浮点数转换成整数 let a = 111.11; console.log(Number.parseInt(a))
去掉/etc/my.cnf 中[mysqld]下 skip-grant-tables 参数,并重启mysql服务 systemctl restart mysqld 进入mysql命令行,修改mysql可以远程访问 mysql grant all privileges on *.* to 'root'@'%' identified by '密码';
Given all the support by both JetBrains and Google, and the almost universal love that Kotlin receives in the developer community, we are sure that the language is not going anywhere. The main question is: will it manage to seriously break into the communities outside of Android? JetBrains is heavily pushing the multi-platform dream, but will it see sufficient adoption in the following months and years?