O'Reilly logo

Amazon SimpleDB Developer Guide by Prabhakar Chaganti, Rich Helms

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

Queries with Select

Now let us run some simple queries against the data that we imported into the songs domain and get familiar with the syntax. Using one of the three examples discussed, you can create the songs domain in your SimpleDB database. Using either the SDBtool Firefox plugin that was discussed in Chapter 2, Getting Started with SimpleDB, or the PHP Try-SQL-Queries sample program, you can try these SQL queries as well as variations on them.

Comparison operators

Select all attribute/values from songs where the Song attribute is My Way. It is important to note that domains and attributes are case-sensitive.

Enter:

SELECT * FROM songs WHERE Song = 'My Way'

Result:

Item name

Song

Artist

Year

Genre

Rating

112222222

My Way

Frank Sinatra ...

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