The SELECT command is used in the database to display the records of a specific table, so it is possible to perform data analysis and use them in other operations.

Let’s learn how to use the following SELECT statement in Oracle database. The syntax to use is very similar to the same command used in other databases like SQL Server and MySQL

SELECT [Fields] FROM [Table]

As a practical example we will conduct a name search and price of a product table.

SELECT Name, Price

FROM product

You even have the option of using the SELECT command with other commands such as WHERE, for example, indicate that a condition for that particular record is displayed.

SELECT Name, Price

FROM product

WHERE cod_prod = 1

In the example above will be returning the record where the product code is equal to 1.

You can also use search operators using the LIKE command, check the example below:

SELECT Name, Price

FROM product



SELECT Name, Price

FROM product


In the first query the database will return all records that have the letter T as the first letter of the product name, in the second example the databse will return all products that have the letter T regardless of what position it is found in the name. The underscore (_) indicates that there is no specific starting position.

You can also use the SELECT command with IN where the database indicates a sequenced information to be used as parameters in the search.

SELECT Name, Price

FROM product

WHERE cod_prod IN (1,2,3)

In the above query will show only products that have code 1, 2 or 3.


The Oracle database has gained more space in the market development so it is essential to understand its operation. Thanks to this WEB projects that use PHP also has adopted Oracle as their database applications, learn about Oracle and PHP on our official visit by clicking the link above.

PHP Oracle

Oracle is one of the most respected DBMS in the world, created in the late 70s by Lary Ellison, quickly turned into one of the most used and trusted. Your security scheme and processing capacity were some of the features that gave it that title. One of the great advantages of Oracle has always been a pioneer in several features for databases, one of the firsts to think about a model for the web in the late 90s.It is very common to find the database Oracle working with PHP applications in development environments.

PHP Oracle

As it is a powerful DBMS, it is common to see projects using Oracle. Several types of applications work using it, so that it is very common to find large PHP projects that need to connect with this type of database. But depending on the tool used to develop the application, the connection may have problems. An external driver that may be used to make the connection may require development hours until it works perfectly. In addition, issues related to security of the connection (data access) also can be a problem.

Therefore it is essential to have a tool that can assist you in this aspect. With Scriptcase you can easily connect to Oracle database, all you need to inform to connect to the Oracle is:

  • Connection Name: It will help you identify the connection among the others.
  • DBMS Driver: it Will show a list with all drivers available.
  • TSNAME: Should be informed the IP of the server where the database is installed and the instance name created in the Oracle installation.
  • Port: The port that you want to use to connect to your database.
  • Username: Username for the user from the database.
  • Password: The password from the previous selected username.

PHP Oracle Connection

Once you connect Scriptcase with your database, it will read your tables and create applications based on the desired tables. Scriptcase will identify all special characteristics from your table, such as primary keys, foreign key, auto-increments, among others, and will show that at the application level. All the CRUD (Create, Read, Update and Delete) actions will be managed by the Scriptcase. On forms and reports all the navigation, searches and filters (Static or Dynamic) will be also handled by Scriptcase automatically.

Scriptcase support stored procedures and all SQL statements (joins, order by, group by, among others) of Oracle, why lose time when you have Scriptcase to help you out?! Download it now and test it free for 20 days!

Know more about the best and most efficient PHP RAD Tool of the market! Get to know Scriptcase.

By ,

September 10, 2013


You might also like…

5 reasons you can’t miss a Black Friday Scriptcase!

This November we bring you the biggest and most important discounts of the year! And do you know wh...

Taking a look at Scriptcase version 9.7

After the big Scriptcase 9.7 presentation event, we have a new version of Scriptcase for download, ...

October Newsletter

Follow the latest news for the month of October! Webinars, blog posts, videos, and more. WEB...

You might also like…

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at Learn more about our Privacy Police.