Database Web Apps
Database Web Applications
SQL Select Statement
SQL Where Clause
Sort Results Orderby
Modify Records Update
SQL Insert Statement
Delete Table Row
Binding DataBound DesignTime Controls
Scripting with Recordsets
Defensive Programming Handling Errors
Updating Database Records
Data Types Databases
Direct Database Access
Write a SELECT statement - Exercise
Retrieve all columns from all rows in a single table.
This exercise is worth 3 points and is scored automatically. When you are finished, just click the
button to receive full credit.
statement that will return all the columns of data in the CustTable of the VirtualBookShelf database.
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.
Open the sqlfun.asp file in the source code editor.
Locate the line: querystring = " "
Insert a complete
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.
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.