github.com/mithrandie/csvq@v1.18.1/docs/_posts/2006-01-02-create-table-query.md (about)

     1  ---
     2  layout: default
     3  title: Create Table Query - Reference Manual - csvq
     4  category: reference
     5  ---
     6  
     7  # Create Table Query
     8  
     9  Create Table query is used to create new csv files.
    10  
    11  ## Create Empty Table
    12  
    13  ```sql
    14  CREATE TABLE [IF NOT EXISTS] file_path (column_name [, column_name ...])
    15  ```
    16  
    17  _file_path_
    18  : [identifier]({{ '/reference/statement.html#parsing' | relative_url }})
    19  
    20  _column_name_
    21  : [identifier]({{ '/reference/statement.html#parsing' | relative_url }})
    22  
    23  If the _IF NOT EXISTS_ clause is specified and the file already exists, no operation is performed.
    24  In this case, an error is raised if the specified columns are different from the existing file.
    25  
    26  ## Create from the Result-Set of a Select Query
    27  
    28  ```sql
    29  CREATE TABLE [IF NOT EXISTS] file_path [(column_name [, column_name ...])] [AS] select_query
    30  ```
    31  
    32  _file_path_
    33  : [identifier]({{ '/reference/statement.html#parsing' | relative_url }})
    34  
    35  _column_name_
    36  : [identifier]({{ '/reference/statement.html#parsing' | relative_url }})
    37  
    38  _select_query_
    39  : [Select Query]({{ '/reference/select-query.html' | relative_url }})
    40  
    41  If the _IF NOT EXISTS_ clause is specified and the file already exists, no operation is performed.
    42  In this case, an error is raised if the specified columns are different from the existing file.