Ich habe viele Spalten in einer Tabelle. Ich will alles in meiner Anfrage ersetzen:Was ist der Vi-Editor Regex dafür?
select count(distinct a), count(distinct b), count(distinct c), count(distinct d) from table_name;
um so etwas wie diese Aliase zu reflektieren:
select count(distinct a) as a, count(distinct b) as b, count(distinct c) as c, count(distinct d) as d from table_name;
Bitte bearbeiten Sie Ihre Frage, um besser zu spezifizieren, was Sie in Frage stellen. – buczek
Können Sie bitte posten, was Sie bisher versucht haben? –
': 1, $ s/(distinct \ ([a-z] * \))/(distinct \ 1) als \ 1/g' –