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
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) ?
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