Solved

Insert fixed value to empty fields of mysql table

Posted on 2011-09-20
1
282 Views
Last Modified: 2012-05-12
Hi,

I need to insert 'NK' into all empty fields in mysql table. I know how to do this column by column, but is there any simple code to do this?

I mean something like: Check all the records in 'users' table and replace empty values with 'NK'.

Thanks for any help.
0
Comment
Question by:Zado
1 Comment
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 250 total points
ID: 36568658
I'd suggest writing a script to do it or just build the SQL statements you need and run those.  

You also have to be concerned about the data type of each column. You can't just go stick an 'NK' into a column defined as an int, for example.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

789 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