KariiiM Posted September 25, 2015 Posted September 25, 2015 Hey guys, Today, i was scripting something related to saving into database to improve my skills, but i face a simple problem i don't know if it's possible or not that's why im asking, Is it possible to edit a table like adding more columns into it without deleting the TABLE? Because if you deleted the table all the datas will be lost,if 'Yes' which way should i follow?
Dealman Posted September 25, 2015 Posted September 25, 2015 Of course it is, a little Google search and you'd have found this; ALTER TABLE It has a link to a few examples, which should help you get going If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
KariiiM Posted September 25, 2015 Author Posted September 25, 2015 Of course it is, a little Google search and you'd have found this; ALTER TABLEIt has a link to a few examples, which should help you get going Thanks Dealman for the reply, i will have a look now Edit: your link is with hard examples, anyway I solved it with another way thanks for your time
KariiiM Posted September 25, 2015 Author Posted September 25, 2015 I used this way for the people who have the same problem in future, local connection = exports.mysql:getConnection( ) dbExec(connection , "ALTER TABLE table_name ADD Column1 TEXT, Column2 TEXT ") -- You can add more columns
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