MySQL导入SQL Server表结构和数据

简述

本文主要是讲解通过Navicat for MySQL工具来将SQL Server表结构和数据导入到MySQL数据库。

本文环境版本:
MySQL版本:5.7.31
SQL Server版本:Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
Navicat Premium版本:15.0.12

具体操作步骤如下所示。

操作步骤

选择指定数据库,点击右侧导入向导,选择“ODBC”,点击下一步,如下图示:

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行