Oracle SQL/PLSQL Section 1.3: Hello world! from table

 Oracle SQL/PLSQL  Section 1.3: Hello world! from table.



Create a simple table

 CREATE TABLE MY_TABLE (
   WHAT VARCHAR2(10),
   WHO VARCHAR2(10),
  MARK VARCHAR2(10)
 );


Insert values (you can omit target columns if you provide values for all columns)

INSERT INTO my_table (what, who, mark) VALUES ('Hello', 'world', '!' );
INSERT INTO my_table VALUES ('Bye bye', 'ponies', '?' );
INSERT INTO my_table (what) VALUES('Hey');


 Remember to commit, because Oracle uses transactions 

 COMMIT;

Select your data

SELECT what, who, mark FROM my_table WHERE what='Hello';




Post a Comment

0 Comments