Article Preview
Buy Now
COLUMN
Building a User Interface
Issue: 1.5 (April/May 2003)
Author: Paul Lefebvre
Author Bio: Paul Lefebvre is President and Chief Architect of LogicalVue Software, producers of SQLVue Professional and many other products.
Article Description: No description available.
Article Length (in bytes): 6,072
Starting Page Number: 27
Article Number: 1513
Resource File(s):
1513.zip Updated: 2013-03-11 19:07:56
Related Link(s): None
Excerpt of article text...
Welcome back! So far, using our Softball example, we have learned how to design a database, convert it to tables, and work with SQL. Now it is time to build a user interface for the Softball database. We'll start with the game table. But first, I want to cover a couple SQL statements that we'll be using.
More SQL Commands
In addition to retrieving rows of data, the SELECT command also allows you to apply functions to those rows in various ways. The built-in REALbasic database engine supports COUNT, MIN, MAX, AVG, and SUM. For example, here is the SQL to find out how many teams there are (you can use SQLVue to test out SQL statements -- see our last column):
SELECT COUNT(key) FROM team
Last time, we used the INSERT command to add rows to our tables. The companion to the INSERT command is the DELETE command, which removes rows from a table. This is the SQL to delete the "Ducks" team from the team table:
DELETE FROM team WHERE name = "Ducks"
...End of Excerpt. Please purchase the magazine to read the full article.