Karuzo Posted March 21, 2014 Share 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. Link to comment
JR10 Posted March 21, 2014 Share Posted March 21, 2014 You can use the ALTER statement. http://www.w3schools.com/sql/sql_alter.asp Link to comment
Karuzo Posted March 21, 2014 Author Share 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) ? Link to comment
JR10 Posted March 21, 2014 Share Posted March 21, 2014 If you mean the syntax then yes. Link to comment
Karuzo Posted March 21, 2014 Author Share Posted March 21, 2014 Yeah, i think i got now what i need. Thanks. 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