Jump to content
Sign in to follow this  
superfrank

SQL command for new fields without phpmyadmin

Recommended Posts

For installing the New Fields contribution, I need to alter the products table in the database. The instructions say:

First using PhpMyAdmin click on the products table on the left. Add a new field called products_artist, set the type to varchar(45), Null to null and default to NULL.

 

But I do not have PhpMyAdmin, so I would need to do it through the MySQL commandline. I think the command should be something like:

ALTER TABLE products ADD COLUMN products_artist VARCHAR(45) DEFAULT NULL;

but I couldnt find anything about the Null to null, and mostly I suspect there are some syntax errors in my line above anyway.

 

Can anybody tell me what the SQL command should be *exactly*?

Share this post


Link to post
Share on other sites
Can anybody tell me what the SQL command should be *exactly*?

 

So it wasn't so bad after all... For anybody else who likes to know, the command should be:

ALTER TABLE products ADD COLUMN products_artist VARCHAR(45) NULL DEFAULT NULL;

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×