How to add a column in an SQLite database
#1

I was wondering how to add a new column at the END of the SQLite database because when i add a column it is on the beginning of the base.

Thank you.
Reply
#2

I'm not sure if the native SQLite supports it, but this is the syntax.

credits to whoever is the author @sqlite documenation
Reply
#3

Add a column to a database? You mean a table right?

Code:
ALTER TABLE `table_name` ADD `column_name`;
You can select the format of the column by typing it after you write the column name:

Code:
ALTER TABLE `table_name` ADD `column_name` varchar(24);
Creates a string based on 24 characters for the new column. There is also a integer one which is simple 'INT' and instead of '24' you would insert the amount of digits that row would tend to use (maximum).

You don't have to even add the format afaik..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)