title: T-SQL How to create tables dynamically in stored procedures?
body: <p>Code like this, but it's wrong:</p>
  
  <pre><code>CREATE PROC sp_createATable
    @name        VARCHAR(10),
    @properties  VARCHAR(500)
  AS
    CREATE TABLE @name
    (
      id  CHAR(10)  PRIMARY KEY,
      --...Properties extracted from @properties
    );
  </code></pre>
  
  <p>Could you tell me how to deal with it? It really troubles me.</p>