Home » SQL & PL/SQL » SQL & PL/SQL » will this query work in oracle10g
will this query work in oracle10g [message #196429] Thu, 05 October 2006 05:55 Go to next message
sreehari
Messages: 101
Registered: May 2006
Senior Member
Hi all

Please let me know,whether the following query works in the Oracle or not?


SELECT CONTRACT_NUMBER, * FROM CONTRACT WHERE CONTRACT_NUMBER IN ('PTA29DEC200510345', 'PTA31JAN200610675')

Thanks
Re: will this query work in oracle10g [message #196433 is a reply to message #196429] Thu, 05 October 2006 06:03 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
Did you try it? And what happened?
Re: will this query work in oracle10g [message #196434 is a reply to message #196429] Thu, 05 October 2006 06:05 Go to previous messageGo to next message
Littlefoot
Messages: 20899
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, it wouldn't work. However, if you precede an asterisk sign with a table name, it will be OK:

SELECT contract_number, contract.*
FROM contract
WHERE ...

Just being curious - why would you want to select separately "contract_number", and then select it once again as part of '*'?
Re: will this query work in oracle10g [message #196445 is a reply to message #196434] Thu, 05 October 2006 06:30 Go to previous message
sreehari
Messages: 101
Registered: May 2006
Senior Member
Thaks a lot

i wanted to display this column in the first position in the column list after querying.
Previous Topic: Oracle select query
Next Topic: PickList query help needed Please
Goto Forum:
  


Current Time: Wed Dec 07 14:22:48 CST 2016

Total time taken to generate the page: 0.05710 seconds