# Prepared Statement by SQL
```
~!@PREPARE@!~ check_query FROM
'SELECT TIDB_ROW_ID_SHARDING_INFO, TIDB_PK_TYPE 
    FROM information_schema.tables 
    WHERE table_schema=~!@?@!~
        AND table_name=~!@?@!~';
~!@EXECUTE@!~ check_query USING @schema, @table;
~!@DEALLOCATE PREPARE@!~ check_query;
```

------------------------------------------------------------
The example in the slide prepares a statement that determines the `TIDB_ROW_ID_SHARDING_INFO` and `TIDB_PK_TYPE` for a specified table.

The table is determined by two user-defined variables `schema` and `table`.
 