O'Reilly logo

OCA Oracle Database 11g: SQL Fundamentals I: A Real-World Certification Guide by Steve Ries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using arithmetic operators with SELECT

Although we've looked at several examples of using SELECT statements to manipulate strings of text, we can just as easily use SQL to complete arithmetic operations. As with many programming languages, we can make use of arithmetic operators to accomplish this.

The DUAL table and the use of string literals

Let's say, for a moment, you did not want to display data from a table, but rather a fixed literal statement such as "I Love Companylink". We need to introduce another set of syntactical operators, the single quotes ('), in order to do this. In SQL, when any word or phrase is enclosed within single quotes, it becomes expressed as a string literal. However, how would we display our literal statement using SQL? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required