在每行开始添加单引号,光标默认在第一行首位,按住 alt + shift + 方向键下拉,选中多行后直接输入单引号字符 选择 View -> Show Symbol -> Show End of Line, 末尾会出现 CR LF 字样,Ctrl + F 选择 Replace,输入 “\r\n”, 替换成 “',” 即可 演示: (或者替换 ^,代表替换行首,替换 $,代表替换行尾)
场景:两张表有一个共有的字段关联,比如说 A 表,B 表都有一个关联的 id,现在想根据 id,将 A 表的 name 字段更新到 B 表的 name 字段上 SQL: update tab1set val = (select val from tab2 where tab1.id = tab2.id)where exists(select 1 from tab2 where tab1.id = tab2.id);参考: https://blog.csdn.net/aiynmimi/article/details/53993803
Sub CheckDiff() Dim r%, i% Dim arr, brr Dim d As Object Set d = CreateObject("scripting.dictionary") With Worksheets("sheetName") r = .Cells(.Rows.Count, 1).End(xlUp).Row arr = .Range("a2:a" & r) For i = 1 To UBound(arr) d(arr(i, 1)) = "" Next r =...