问题描述
我在 Notepad++ 中有一个表名列表:
employee
manager
customer
reciepts
customer_details
employee_mapping
manager_employee_mapping
我希望在同一行中再次重复每个单词,例如:
employee employee
manager manager
customer customer
等等。我想这样做是为了制作一个 sql 脚本,我必须在其中选择表名作为字符串和表的总数。喜欢:
select 'employee',count(1) from employee union
select 'manager',count(1) from manager union
同样适用于所有行。
现在,可以使用 ctrl+F 或在开头和结尾插入轻松插入 select/union/count/,/from
之类的词。但是将表名作为字符串获取是很棘手的。
有没有办法在Notepad ++中做到这一点而无需手动执行此操作?
这个列表只是一个示例,我有一个包含 100 多个表的列表。请帮忙。