# Prepared Statement by SQL
```10
~!@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.
 