If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > ROLL in HELP INDEX SQL 10g

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Oct 2012
Posts: 5
Arrow ROLL in HELP INDEX SQL 10g

I have found Problem in ROLL....
b'coz all SQL*PLUS commands are works WITHOUT semicolon'',
but in HELP INDEX command ROLL is not listed....
so what exactly ROLL does...and WHY IT IT SUPPORTED WITH OUT SEMICOLON';'...
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Jun 2004
Posts: 727
I have never come across the 'ROLL' command before, and I, too, would be interested to know what it does.
__________________
90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.
Reply With Quote
  #3 (permalink)  
Old
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,393
unless he means ROLLUP?
__________________
Bill
You do not need a parachute to skydive. You only need a parachute to skydive twice.
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Mar 2010
Location: Vienna, Austria
Posts: 149
it is supported without the semicolon, because it's the old (< Oracle V6) version of the command and kept for compatibility.

Concerning what exactly it's doing:

Guess:

Code:
SQL> roll
Rollback complete.
SQL>
__________________
"There is always an easy solution to every problem - neat, plausible, and wrong."
-- H.L. Mencken
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Oct 2012
Posts: 5
Correct answer

Difference between rollbac and rollback


What is the difference between rollbac and rollback?


SQL> create table t as select 1 x from dual;

Table created.

SQL> update t set x=2;

1 row updated.

SQL> savepoint a;

Savepoint created.

SQL> update t set x=3;

1 row updated.

SQL> rollbac to savepoint a;
Rollback complete.
SQL> select * from t;
X
----------
1

WTF! rollbac does not seem to work correctly

Actually, ROLL, ROLLB, ROLLBA and ROLLBAC are not valid SQL statements. However, SQLPLUS recognizes it a sqlplus statement but this behavior is not documented.


SQL> del *
SQL> roll
Rollback complete.
SQL> list
SP2-0223: No lines in SQL buffer.

The statement does not end with semi-column and is not stored in the SQLPLUS buffer.

So it is not a SQL command.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Oct 2012
Posts: 5
Quote:
Originally Posted by cis_groupie View Post
I have never come across the 'ROLL' command before, and I, too, would be interested to know what it does.
see i have posted the right answer...
Reply With Quote
  #7 (permalink)  
Old
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,962
You must be very proud of yourself. Too bad that it is just an exact copy/paste of someone else's answer. It would be fair if you specified that you, actually, found that on the Internet, posted a link and mentioned the original author.
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Nov 2003
Posts: 2,779
Quote:
Originally Posted by Littlefoot View Post
You must be very proud of yourself. Too bad that it is just an exact copy/paste of someone else's answer. It would be fair if you specified that you, actually, found that on the Internet, posted a link and mentioned the original author.
Looking at the language (what's that "b'coz" thing anyway?), the senseless overuse of dots to end a statement and the formatting of the initial question from darshan30589 here and user "967590" in the Oracle forum, I'd say they are both the same person (the copied answer from OTN is also from user "967590" - just like the question)
__________________
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

Tips for good questions:

http://tkyte.blogspot.de/2005/06/how...questions.html
http://wiki.postgresql.org/wiki/SlowQueryQuestions
http://catb.org/esr/faqs/smart-questions.html
Reply With Quote
  #9 (permalink)  
Old
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,962
OK then, I'll correct myself (after some more digging): I agree, darshan30589 on dBforums is the same person as user 967590 on OTN Forums. I also agree that he copied & pasted here what he already wrote there.

However:I'm pretty sure that darshan30589 / 967590 is NOT Laurent Schneider who posted that in 2008. So, in my opinion, credits go to Laurent Schneider, not our plagiarist.
Reply With Quote
  #10 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Location: Switzerland
Posts: 1
Quote:
Originally Posted by Littlefoot View Post
I'm pretty sure that darshan30589 / 967590 is NOT Laurent Schneider

Indeed he is not Thank you littlefoot for the credit.

I am always having fun with sqlplus

Code:
SQL> ROLL AND ROCK
SQL> DISCO
Cheers
Laurent
Reply With Quote
  #11 (permalink)  
Old
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,962
LOL! Ayatollah of disco, roll and rock!
Reply With Quote
  #12 (permalink)  
Old
Registered User
 
Join Date: Oct 2012
Posts: 5
Credit always goes to That Author and that is You....but i posted it here for reference of right answer only...and posted it only after Trying it...so no worry....i have already telling thanks to you.. ...Thanks to YOU for Great answer again...
Reply With Quote
  #13 (permalink)  
Old
Registered User
 
Join Date: Oct 2012
Posts: 5
Thanks for Great Answer....

It was your original posted answer...it's GREAT one....Sorry for formatting the Name under the Answer...
Reply With Quote
  #14 (permalink)  
Old
Registered User
 
Join Date: Nov 2003
Posts: 2,779
What's the matter with your keyboard? It seems the key with the . character repeats too many times when you press it. You should get that fixed.
__________________
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

Tips for good questions:

http://tkyte.blogspot.de/2005/06/how...questions.html
http://wiki.postgresql.org/wiki/SlowQueryQuestions
http://catb.org/esr/faqs/smart-questions.html
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On