How do I create query in Oracle that works in SQL Server

Hi Experts,

When working in SQL server I quite often write something along the lines of

SELECT LastName, * FROM Table...

This helps when I am doing some initial investigation and the 'LastName' field is of particular interest to me, but I also want to see the rest of the record.  It stops me from having to scroll through the rest of the record to see 'LastName'.

Now I'm working on Oracle, and that syntax returns an error of "Missing Expression".

What is the correct syntax to accomplish this in Oracle ?
Steve5140Asked:
Who is Participating?
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
You need to provide the table name or alias for the '*'.

Try something like:

SELECT LastName, table.* FROM Table...
0
 
Steve5140Author Commented:
You are correct, that worked just fine.  I probably should have been able to figure that out but I just didn't see it.
0
 
slightwv (䄆 Netminder) Commented:
lol...

You might be surprised how obscure that is!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.