Click here to Skip to main content
16,003,404 members
Home / Discussions / Database
   

Database

 
GeneralRe: What kind of Errors the SELECT statement can raise?? Pin
_J_29-Mar-05 11:07
_J_29-Mar-05 11:07 
AnswerRe: What kind of Errors the SELECT statement can raise?? Pin
Andy Brummer29-Mar-05 11:22
sitebuilderAndy Brummer29-Mar-05 11:22 
GeneralIdeas to Update DATA received from the client Pin
_J_28-Mar-05 6:38
_J_28-Mar-05 6:38 
GeneralRe: Ideas to Update DATA received from the client Pin
Edbert P28-Mar-05 20:06
Edbert P28-Mar-05 20:06 
GeneralRe: Ideas to Update DATA received from the client Pin
_J_28-Mar-05 21:27
_J_28-Mar-05 21:27 
GeneralMSDataShape Error Pin
gUrM33T28-Mar-05 4:32
gUrM33T28-Mar-05 4:32 
GeneralQuestion about from syntax Pin
Esmo200028-Mar-05 4:19
Esmo200028-Mar-05 4:19 
GeneralRe: Question about from syntax Pin
Jeff Martin28-Mar-05 7:28
Jeff Martin28-Mar-05 7:28 
The first statement you mention is using aliases for the table. Typically you don't see people use the exact same name as the table, since that is pointless. I use it to abbreviate the table name i.e.

select e.EmpID, e.EmpName, et.Description
from Employee e, EmployeeType et
where...

Basically, I am aliasing Employee to e and EmployeeType to et.

Which answers your second question. The alias.field just specifies which table to pull the field from. It is only necessary when you have the same field name in two tables in your query. If you do not specify a table name, it will not cause a problem. If a field name exists in two tables in the same query and you do not specify a table name, it will result in an error (can't remember what it is right now).

Example:

select EmpID, EmpName, Description, e.EmpTypeID
from Employee e, EmployeeType et
where e.EmpTypeID = et.EmpTypeID

Notice, I do not put the table name in front of EmpID, EmpName or Description because they only exist in one table. However, both tables have a field called EmpTypeID, so I precede it with the table alias (e and et)

Jeff Martin
My Blog
GeneralRe: Question about from syntax Pin
Esmo200028-Mar-05 7:41
Esmo200028-Mar-05 7:41 
GeneralDatasets/Updating Pin
Nuhn28-Mar-05 3:16
Nuhn28-Mar-05 3:16 
GeneralRe: Datasets/Updating Pin
Suman Singh29-Mar-05 11:04
professionalSuman Singh29-Mar-05 11:04 
GeneralRe: Datasets/Updating Pin
Nuhn7-Apr-05 4:56
Nuhn7-Apr-05 4:56 
Questionhow to get name of all tables in msaccess database Pin
sumit2127-Mar-05 7:07
sumit2127-Mar-05 7:07 
AnswerRe: how to get name of all tables in msaccess database Pin
rwestgraham28-Mar-05 18:25
rwestgraham28-Mar-05 18:25 
GeneralDataRelation question Pin
IlanTal26-Mar-05 21:36
IlanTal26-Mar-05 21:36 
GeneralRe: DataRelation question Pin
Scott Serl28-Mar-05 10:06
Scott Serl28-Mar-05 10:06 
GeneralRe: DataRelation question Pin
IlanTal28-Mar-05 18:38
IlanTal28-Mar-05 18:38 
GeneralRe: DataRelation question Pin
Scott Serl29-Mar-05 6:44
Scott Serl29-Mar-05 6:44 
GeneralRe: DataRelation question Pin
IlanTal29-Mar-05 7:10
IlanTal29-Mar-05 7:10 
GeneralQuestion about SELECT Pin
_J_26-Mar-05 5:57
_J_26-Mar-05 5:57 
GeneralRe: Question about SELECT Pin
turbochimp26-Mar-05 11:35
turbochimp26-Mar-05 11:35 
GeneralRe: Question about SELECT Pin
Colin Angus Mackay29-Mar-05 1:03
Colin Angus Mackay29-Mar-05 1:03 
GeneralRe: Question about SELECT Pin
_J_29-Mar-05 1:41
_J_29-Mar-05 1:41 
GeneralRe: Question about SELECT Pin
Colin Angus Mackay29-Mar-05 1:48
Colin Angus Mackay29-Mar-05 1:48 
GeneralRe: Question about SELECT Pin
_J_29-Mar-05 1:51
_J_29-Mar-05 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.