title: How create table with stored procedure in SQL Server
body: <p>I want to create a stored procedure on SQL Server.</p>
  
  <p>My code is:  </p>
  
  <pre><code>CREATE PROCEDURE [dbo].[Pcreate]
      @name NVARCHAR(50),
      @namefood NVARCHAR(50),
      @restaurantname NVARCHAR(50),
      @pricefood FLOAT,
      @address NVARCHAR(50)
  AS
  BEGIN   
      CREATE TABLE [dbo].[@name]
      (
          [Id] INT NOT NULL PRIMARY KEY IDENTITY, 
          [@namefood] NVARCHAR(50) NOT NULL, 
          [@restaurantname] NVARCHAR(50) NOT NULL, 
          [@pricefood] FLOAT NOT NULL, 
          [@address] NVARCHAR(50) NOT NULL
      )
  END
  </code></pre>
  
  <p>In C# code:</p>
  
  <pre><code>db.Pcreate(name.Text, restaurantbox.SelectedItem.ToString(), getEdit1(), float.Parse(getEdit2()), adrresstxt.Text);
  </code></pre>
  
  <p>but the code creates the table with <code>@name</code> like in this screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/DtEj1.png" alt="Example"></p>