I have a table with almost 40 fields in it. I want to update all these fields with a single value i.e 1 in a single query and i dont want to specify each column in the update query.
Can anyone help me in it??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can try:
Should help u retrieve the column names from the table, and store them in an array.
changes the array to a string and adds
"=1"to it. Then you can run this your query thus: