Jump to content

Question about MySQL


KariiiM

Recommended Posts

Posted

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?

Posted
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 :)

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

Posted

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   
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...