darhal Posted August 3, 2015 Share Posted August 3, 2015 Hello all, I m using SQL for specific system and after some time of using this system the database being full of data and I dont want to create another one so I lost them and time I forget to add column to the table from the beging so how to add it now without damaging or deleteing the db ? THX all Link to comment
GTX Posted August 3, 2015 Share Posted August 3, 2015 ALTER TABLE table_name ADD column_name datatype Link to comment
darhal Posted August 3, 2015 Author Share Posted August 3, 2015 Does it check if a colum is added or not ? Link to comment
GTX Posted August 3, 2015 Share Posted August 3, 2015 Yeah, it won't add 2 columns with same name obviously. Link to comment
darhal Posted August 3, 2015 Author Share Posted August 3, 2015 We use it like this ? for eg dbExec(dbc, "ALTER TABLE houses ADD pets datatype") Link to comment
GTX Posted August 3, 2015 Share Posted August 3, 2015 datatype must be data type, i.e TEXT. Link to comment
darhal Posted August 3, 2015 Author Share Posted August 3, 2015 THX a lot I will try it btw ;D Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now