markos.aivazoglou
markos.aivazoglou

Reputation: 174

Problems with SELECT clause in plsql

I m working on a project using oracle client and plsql for testing optimizing tuning etc. Here is the thing,this is a university course project so i m asked to create some tables then run some queries(and then optimize etc),and we have 2 options doing it.Either from linux terminal either from plsql.I create the tables from terminal in the database using sqlplus,then run the queries in plsql,but i have no results(it's like the rows are empty,but they are not). I did some search but i cant find a solution. If you need to know more details tell me. Thanks in advance.

Upvotes: 0

Views: 165

Answers (1)

CrimeWire
CrimeWire

Reputation: 54

Are you saying that you create your table in a sqlplus session, insert data into it, and then run a separate session where you're querying the tables using plsql?

If so, are you committing your work after performing the insert?

For example, if you're doing this in sqlplus:

create table foo (id number, value varchar(255), primary key (id));
insert into foo (id, value) values (1, 'bar');
insert into foo (id, value) values (2, 'baz');
commit;

Then you should be to see the 2 rows in the table foo in another session. However, if you're not doing the commit then the new table will be visible to another session but it will appear to be empty.

Upvotes: 1

Related Questions