Thanks @Jinnai for the sql update. Close #26605 (cherry picked from commit a7fa9f28db87403ce2c19d86364bfe93b6c96aa4)