Solved

MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
1
220 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

623 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