Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Help with sql query for multiple years

926101Mar 23 2012 — edited Mar 23 2012
Hello,

I am new to SQL and am trying to perform a query that includes multiple years from 2005 to 2011.

I was trying to enter the following query but received a message that said "Operand should contain 1 column(s)"

SELECT * FROM `auto_2` WHERE `year` LIKE (2005, 2006, 2007, 2008, 2009, 2010, 2011);

What am I doing wrong here? Please advise...

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2012
Added on Mar 23 2012
3 comments
544 views