MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
Last Modified: 2013-12-12

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.

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

Question by:mdadnan
1 Comment
LVL 17

Accepted Solution

HuyBD earned 125 total points
Comment Utility
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


Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now