Skip to content
Advertisement

Error Code: 1242. Subquery returns more than 1 row in Attribute Subquery

I’m trying to get the difference between two dates deathtime and admittime using subquery in attribute list. This is the script that I run:

It returns Error Code: 1242. Subquery returns more than 1 row when I run it. Would really appreciate any help.

Advertisement

Answer

The reason why you’re getting that error is because a subquery can’t return more than 1 result.

Try this:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement