RelationalDBDesign
SiteMap
Business Rules
Cursors Views
Database Creation
SQL Monitoring
Database Web Apps
Data Manipulation
Access Features
Tables Queries
Basic Queries
«Prev
Next»
Database Web Applications
Database Concepts
Table Structures
SQL
Data Binding
Basic Queries
SQL Select Statement
SQL Where Clause
Sort Results Orderby
Modify Records Update
SQL Insert Statement
Delete Table Row
SQL Capability Conclusion
Data Access
Binding DataBound DesignTime Controls
Scripting with Recordsets
Defensive Programming Handling Errors
Modifying Data
Updating Database Records
Data Types Databases
Direct Database Access
Write a SELECT statement - Exercise
Objective:
Retrieve all columns from all rows in a single table.
Exercise scoring
This exercise is worth 3 points and is scored automatically. When you are finished, just click the
Submit
button to receive full credit.
Background/overview
Write a
SELECT
statement that will return all the columns of data in the CustTable of the VirtualBookShelf database.
Download files
You will need the file sqlfun.asp to do this exercise. This file can be used to easily enter and execute a SQL statement and view the results in an HTML table.
Instructions
Open the sqlfun.asp file in the source code editor.
Locate the line: querystring = " "
Insert a complete
SELECT
between the quotation marks statement to return all the columns in the CustTable.
To execute the statement, first save the file, then right-click the source editor window and select View in Browser. The statement will be executed and the output displayed in the browser window.
Hints
If you have not inserted the sqlfun.asp file into the VirtualBookShelf.com project, refer to Lesson titled "Data binding" in the previous Module.
The * character makes it very easy to request all the columns in a row. Of course, you can specify all the columns by name, but this is a lot easier.