Here's what I found. I knew it was necessary in a self-join (which I rarely use), but I see why they are good to use:
Using Table Aliases
The use of table aliases means to rename a table in a particular SQL statement. The renaming is a temporary change. The actual table name does not change in the database. As you will learn later in this hour, giving the tables aliases is a necessity for the SELF JOIN. Giving tables aliases is most often used to save keystrokes, which results in the SQL statement being shorter and easier to read. In addition, fewer keystrokes means fewer keystroke errors. Also, programming errors are typically less frequent if you can refer to an alias, which is often shorter in length and more descriptive of the data with which you are working. Giving tables aliases also means that the columns being selected must be qualified with the table alias.
Thanks Philip for the heads up! (I know darn well I am supposed to do #2 and #3)

Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293

http://www.childrensdayton.org

"There is no right price for the wrong product, even if it is inexpensive and delivered on time."

>>> [EMAIL PROTECTED] 5/6/2004 10:48:44 AM >>>

Can I say 3 things

1) Alias your table names
2) Scope your variables
3) CFQUERYPARAM!!!!

It should make it easier to track down any issues you're having

> From: Candace Cottrell
>
> Hey all!!  I am working on a little search function and need
> just a little help with the query.

<CF_SNIP>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to