Link to home
Start Free TrialLog in
Avatar of theomysh
theomysh

asked on

Add column to database table

I have an application that is going to import data from a tab delimited text file to a table in SQL Server 2005. Sometimes the column does not already exist in the database table. What do I have to write for code to go about adding a column to the database table in vb .net?
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

You execute a SQL statement such as this for MS SQL Server for example:
(http://msdn.microsoft.com/en-us/library/aa275462(SQL.80).aspx)
ALTER TABLE your_table_name
ADD COLUMN column_name {datatype};

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of theomysh
theomysh

ASKER

I did not realize that it was that simple, I was searching for a much more complicated solution LOL