'schema ?TABLE? [TABLE...]: Shows SQL for table
If you give one or more tables then their schema is listed
(including indices).  If you don\'t specify any then all
schemas are listed. TABLE is a like pattern so you can % for
wildcards.'

def command_schema(self, cmd):

    self.push_output()
    self.output = self.output_list
    self.header = False
    try:
        if (len(cmd) == 0):
            cmd = ['%']
        for n in cmd:
            self.process_sql("SELECT    sql||';'    FROM    (SELECT    sql    sql,    type    type,    tbl_name    tbl_name,    name    name    FROM    sqlite_master    UNION    ALL    SELECT    sql,    type,    tbl_name,    name    FROM    sqlite_temp_master)    WHERE    tbl_name    LIKE    ?1    AND    type!='meta'    AND    sql    NOTNULL    AND    name    NOT    LIKE    'sqlite_%'    ORDER    BY    substr(type,2,1),    name", (n,), internal=True)
    finally:
        self.pop_output()
