Solved

MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
1
217 Views
Last Modified: 2013-12-12
Hi,

I am having problem running an SQL query in PhpMyAdmin and I am getting following error doing it.

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NO NULL AFTER name' at line 1


any help on this would be appreciated.

Thanks.
ALTER TABLE jos_users ADD business VARCHAR (100) NO NULL AFTER name;
 
ALTER TABLE jos_users ADD phone VARCHAR (100) NO NULL AFTER business;

Open in new window

0
Comment
Question by:mdadnan
1 Comment
 
LVL 17

Accepted Solution

by:
HuyBD earned 125 total points
ID: 22622213
change to not null
ALTER TABLE jos_users ADD business VARCHAR (100) NOT NULL AFTER name;
 
ALTER TABLE jos_users ADD phone VARCHAR (100) NOT NULL AFTER business;

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question