mysql与sqlserver关联更新对比

--mysql
update student s, city c
set s.city_name = c.name
where s.city_code = c.code;

--sqlserver
update t1 set t1.name = t2.name
from user_01 t1
join user_02 t2 on t1.code = t2.code
where t2.name is not null;

vi/vim常用命令

简介

vi/vim共分为三种模式,分别是一般模式,编辑模式和命令模式。

用户刚启动vi/vim,便进入了一般模式;
在一般模式下按下i就进入了编辑模式;
在一般模式下按下:就进入了命令模式;

一般模式

复制:

yy    复制当前行
nyy    从光标向下复制n行

Linux服务器常用命令

1、根据进程ID查看对应端口:

netstat -anp | grep pid

2、根据端口号查询进程ID:

netstat -tunlp | grep 8080

3、压缩/解压缩文件:

压缩文件:
zip -q -r 123.zip 123.sql -P123

解压文件:
unzip 123.zip