Karuzo Posted March 21, 2014 Posted March 21, 2014 Hey Guys, I wanted to know how i can add columns to an existing table, and specify their data-type. but only if the columns don't exist. and what bout NOT NULL ? How would i add that to the datatype ? Like : x INT NOT NULL, ? Regards, KRZO.
JR10 Posted March 21, 2014 Posted March 21, 2014 You can use the ALTER statement. http://www.w3schools.com/sql/sql_alter.asp Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Karuzo Posted March 21, 2014 Author Posted March 21, 2014 You can use the ALTER statement.http://www.w3schools.com/sql/sql_alter.asp Ah, perfect that's what i searched for . And what about the NOT NULL ? is this correct: db_connect(connect,ALTER .... x INT NOT NULL) ?
JR10 Posted March 21, 2014 Posted March 21, 2014 If you mean the syntax then yes. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Karuzo Posted March 21, 2014 Author Posted March 21, 2014 Yeah, i think i got now what i need. Thanks.
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