I am trying to create a SQL Server table programmatically. Here is the code.
using (SqlConnection con = new SqlConnection(conStr))
{
try
{
/
Try this
Check if table have there , and drop the table , then create
using (SqlCommand command = new SqlCommand("IF EXISTS (
SELECT *
FROM sys.tables
WHERE name LIKE '#Customer%')
DROP TABLE #Customer CREATE TABLE Customer(First_Name char(50),Last_Name char(50),Address char(50),City char(50),Country char(25),Birth_Date datetime);", con))