MySQL batch modify the field name to lowercase

Time:2020-10-29

1、 Batch modify the field name to lowercase;

  1. Query to get the execution statement to be adjusted;

SELECT concat( ‘alter table ‘, TABLE_ NAME, ‘ change column ‘, COLUMN_ NAME, ‘ ‘, LOWER( COLUMN_ NAME ), ‘ ‘, COLUMN_ TYPE, ‘ comment ”, COLUMN_ Comment, ‘;’) as’ modify script ‘from information_ schema.COLUMNS WHERE TABLE_ Schema =’library name ‘;

2. Execute the query statement and modify the field name;

3. In upper case, adjust the lower function to upper;

Recommended Today

The selector returned by ngrx store createselector performs one-step debugging of fetching logic

Test source code: import { Component } from ‘@angular/core’; import { createSelector } from ‘@ngrx/store’; export interface State { counter1: number; counter2: number; } export const selectCounter1 = (state: State) => state.counter1; export const selectCounter2 = (state: State) => state.counter2; export const selectTotal = createSelector( selectCounter1, selectCounter2, (counter1, counter2) => counter1 + counter2 ); // […]