@Override
    public String getTableName() {
        SQLSelectQueryBlock selectQueryBlock = getSelect();
        SQLTableSource tableSource = selectQueryBlock.getFrom();
        StringBuilder sb = new StringBuilder();
        SQLServerOutputVisitor visitor = new SQLServerOutputVisitor(sb) {
            @Override
            public boolean visit(SQLExprTableSource x) {
                printTableSourceExpr(x.getExpr());
                return false;
            }
        };
        visitor.visit((SQLExprTableSource) tableSource);
        return sb.toString();
    }
@Test
    public void testGetTableName() {
        String sql = "SELECT * FROM t WITH (UPDLOCK)";
        SQLStatement ast = getSQLStatement(sql);

        SqlServerSelectForUpdateRecognizer recognizer = new SqlServerSelectForUpdateRecognizer(sql, ast);
        Assertions.assertEquals("t", recognizer.getTableName());

        //test for alias
        sql = "SELECT * FROM t t1 WITH (UPDLOCK)";
        ast = getSQLStatement(sql);
        recognizer = new SqlServerSelectForUpdateRecognizer(sql, ast);
        Assertions.assertEquals("t", recognizer.getTableName());
    }