* in query

  • Thread starter Thread starter Jim McColl
  • Start date Start date
J

Jim McColl

When you add a table to a query there is an asterisk at the top of the list
of fields.

Anybody know the pupose of this ???
 
That refers to select ALL the fields. That is:

Select *
From tblPerson

This will select all the fields from the table.

The alternative to this would be to specify each field:

Select FirstName, LastName, StateName
From tblPerson

HTH

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
 
This when selected includes all the fields in the table, even those added
after the query is created.

SELECT dbo_BusinessContact.*
FROM dbo_BusinessContact;

This will return all fields and all records in the table
dbo_BusinessContact.

The effect is similar to opening the table in Datasheet view.
 
Craig Alexander Morrison said:
This when selected includes all the fields in the table, even those added
after the query is created.

SELECT dbo_BusinessContact.*
FROM dbo_BusinessContact;

This will return all fields and all records in the table
dbo_BusinessContact.

The effect is similar to opening the table in Datasheet view.

--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

Thanks gentlemen
 
Back
Top