Home » SQL & PL/SQL » SQL & PL/SQL » how to fetch a row by row using sql
icon11.gif  how to fetch a row by row using sql [message #290452] Sat, 29 December 2007 00:36 Go to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi gurus,

Thanks in advance,

I want to give grant permission for all table under my control to another user

 Select 'Grant Select on',(select table_name from user_tables) tname from dual
  2  ;
 Select 'Grant Select on',(select table_name from user_tables) tname from dual
                           *
ERROR at line 1:
ORA-01427: single-row subquery returns more than one row


This my problem pls help me

Wbr
Kanish
Re: how to fetch a row by row using sql [message #290457 is a reply to message #290452] Sat, 29 December 2007 00:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Did you google for the errormessage?
The message is pretty self-explaining too..

tip: do not select from dual, but from user_tables. Now you think how to change your query.

ok, another tip: don't select the fixed text and the tablename in two separate columns, but use concatenation.
Re: how to fetch a row by row using sql [message #290622 is a reply to message #290457] Sun, 30 December 2007 21:34 Go to previous message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Thanks

It very easy but i was confused.

Thank Frank.


Previous Topic: ORA 1410
Next Topic: PLS-00306: wrong number or types of arguments in call to 'QDA_TBL'
Goto Forum:
  


Current Time: Thu Dec 08 02:37:19 CST 2016

Total time taken to generate the page: 0.13884 seconds