KariiiM Posted September 25, 2015 Share 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? Link to comment
Dealman Posted September 25, 2015 Share 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 Link to comment
KariiiM Posted September 25, 2015 Author Share 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 Link to comment
KariiiM Posted September 25, 2015 Author Share 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 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