Sqlite adding fields
#1

Just wanna know, is there a way to add a field to a sqlite database? Like CREATE FIELD IF NOT EXIST or something?

I tried to make one in SQLite Database browser but it only lets me create a field at the beginning of the table, and I kinda want it at the end of the table (im picky :P)
Reply
#2

Yeah, you can do this:

pawn Код:
ALTER TABLE `Field` ADD COLUMN `ColumnName` DEFAULT 0
You just need to execute it using db_query or something.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)