Re: How do you save in SQL?
Date: 1997/02/04
Message-ID: <32F76C6C.5C4A_at_brightwood.com>#1/1
sears_at_koyote.com wrote:
>
> Hi, I am a beginner studying SQL databases in Oracle, and
> running into little annoying problems. First, here is
> the senario. To acess Oracle, I telnet from home to
> my school Unix account. The problem is that my telnet
> locks up every time without warning, and I have to close
> the application. Therefore, all data is lost if not
> saved. I was working on my first table and had some
> rows of data entered. I tried to save it with the same
> filename as I used when i created the table, but it would
> not let allow me to do that. So I saved with a different
> filename like wood2.sql. Then the telnet locked up. I close
> and got back in, and was horrified to see that
> when I did a select statement, it would not show any of the
> rows of data I had entered. So what did I do wrong? How
> can you view your saved files on Oracle? How can you
> save the rows? Please help.
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Well, first of all, when 'saving' data to a database, you are not saving a file. The file that you saved is the actuall sql statements you used to insert your rows. You are actually inserting data into a file, and to make the inserts (updates also) you need to 'commit' your work. For example:
insert into table blah values (blah, blah, ...); commit;
Once you do this your data will forever be there. If you do not commit, and do a select it will also show up as being there, but once your sessions stops, that data is 'rollbacked' and will not be there when you re-enter the database.
HTH Regards
//Karl
-- ==================================================== Karl M. Nordquist karln_at_brightwood.com Application Development Bright Wood Corporation Madras, Oregon ====================================================Received on Tue Feb 04 1997 - 00:00:00 CET