Create Database Table in Run Time I have an SQL CREATE TABLE.

CREATE TABLE myid_template_1
(
template_id int NOT NULL,
template_description character varying NOT NULL,

);


I want to know its equivalent query structure in Drupal 7 to create tables at run time. I tried the code below, which it didn't return any error. I wonder if it successfully creates a table, since I could not find the location of the table I created. 

function myid_create_db_fields(){   
    $template_id = 1;
    $schema['myid_template_'. $template_id] = array(
        'description' =&gt; t ('Contains a particular templates data inputted from the MyID Inputting System'),
        'fields' =&gt; array(
           'template_id' =&gt; array(
               'type' =&gt; 'int',
               'not null' =&gt; TRUE,
           ),
           'template_description' =&gt; array(
               'type' =&gt; 'character varying'
               'not null' =&gt; TRUE,
           )
        ),  
    );
    db_create_table('myid_template_' . $template_id, $schema);
}


PS: I don't want to use hook_schema() because the table is not created when the module is installed.
You're passing the wrong thing as the schema definition.

This is what you need:

$schema['myid_template_'. $template_id] = array(...);

db_create_table('myid_template_' . $template_id, $schema['myid_template_'. $template_id);