sql select asp





SQL Select

















Home
SQL Basics:

SQL HOME
SQL Introduction
SQL Select
SQL Where
SQL And & Or
SQL Between
SQL Distinct
SQL Order By
SQL Try It
SQL Insert
SQL Update
SQL Delete
SQL Count

SQL Advanced:

SQL Functions
SQL Group By
SQL Aliases
SQL Join
SQL Create
SQL Alter

SQL Quiz Test

Resources:

SQL Books












SQL Select Statement




The SELECT statement selects columns of data from a database.

The tabular result is stored in a result table (called the
result set).


The SELECT Statement

The SELECT statement selects columns of data from a database.

Use it to SELECT information FROM a table like this:




SELECT column-name(s) FROM table-name






Example: Select Columns from a Table
To select the columns named "LastName" and "FirstName", use
a SELECT
statement like this:



SELECT LastName,FirstName FROM Persons




The "Persons" table:



LastName
FirstName
Address
City


Hansen
Ola
Timoteivn 10
Sandnes


Svendson
Tove
Borgvn 23
Sandnes


Pettersen
Kari
Storgt 20
Stavanger


The result:


LastName
FirstName


Hansen
Ola


Svendson
Tove


Pettersen
Kari





Example: Select all Columns
To select all columns from the "Person" table, use a * symbol
instead of column name like
this: 



SELECT * FROM Persons



The result:


LastName
FirstName
Address
City


Hansen
Ola
Timoteivn 10
Sandnes


Svendson
Tove
Borgvn 23
Sandnes


Pettersen
Kari
Storgt 20
Stavanger





The Result Table
The result from a SQL query is stored in a result set. The result set can be
thought of as a result table. Most database software allow navigation of the
result set with programming functions like: Move-To-First-Record,
Get-Record-Content, Move-To-Next-Record......
Programming functions like these are not a part of this tutorial.
If you want to learn more about accessing SQL data with function calls, study
our ADO School.




Jump to : Top Of Page or HOME.


We Help you for free. Please Help us!

Help us correct errors
Help us with spelling and grammar
Tell us what you think
Link to us from your pages



All information in this Web is for training only. We do not make any warranties of its correctness or
its fitness to be used. The risk of using it remains with the user.
Copyright © 1999-2001 by Refsnes Data. All Rights Reserved.










More Tutorials:


HTML  XHTML
XML  XSL
CSS  DTD
WAP  WML
JavaScript
DHTML  Flash
VBScript  ASP
SQL  AppML






News:

The Future ofProgramming

Web Security

Browser News

Web Standards






References:

HTML 4.01 Ref

XHTML 1.0 Ref

WML 1.1 Ref

CSS Reference

XSLT Elements

ASCII Reference

Entity Reference

HTML Colors

Color Values

Color Names

WAP Pages






Validation:


HTML  XHTML
CSS  DTD
XML  WML







About W3Scripts

Please link to us








Larger Text?








 XML Partners:


















Wyszukiwarka

Podobne podstrony:
sql functions asp
sql groupby asp
sql select
sql alter asp
sql orderby asp
sql alias asp
sql create asp
sql where asp
sql quiz asp
sql count asp
sql distinct asp
sql insert asp
sql join asp
sql update asp
sql intro asp
sql selectinto
sql tryit asp
sql?lete asp

więcej podobnych podstron