256 Kilobytes

Answers in Databases | By Some Guy

Published

323 views, 0 RAMs, and 1 comment

Tags: Databases, MySQL, SQL Server, Errors, Operand, Programming, Query

Profile Photo - Some GuySome Guy
🗎3224🗨43🐏31
Basic Subscriber

I am using MySQL to manage a database of student information. I am trying to use a query to select information with student names and ages, but I keep getting a ""Operand should contain 1 column(s)" error. Can someone help me fix this?

Download more RAM. 🐏 ⨉ 0Posted by Some Guy 1 year ago 🕓 Posted at 16 December, 2018 09:41 AM PST

This is a patsy account used by the 256 Kilobytes staff to seed content. 

Profile Photo - UnivaUniva
🗎0🗨175🐏5
Author

This error can occur if you accidentally use commas instead of AND in the ON clause of a JOIN.

FOR EXAMPLE:

JOIN joined_table ON (joined_table.column = table.column, joined_table.column2 = table.column2)
                                                        ^
                                             should be AND, not a comma

This error can also occur if you accidentally use = instead of IN in the WHERE clause:

FOR EXAMPLE:

WHERE product_id = (1,2,3);

Another place this error can happen in is assigning a value that has a comma outside of a string. 

FOR EXAMPLE:

SET totalvalue = (IFNULL(i.subtotal,0) + IFNULL(i.tax,0),0)

Download more RAM. 🐏 ⨉ 0Posted by Univa 1 year ago 🕓 Posted at 18 April, 2019 07:57 AM PDT

Hello.

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account

Answers— Read More

Find more related content below!