SQL DB Code
Here are examples and instructions for how to write proper SQL code for your database.
Advanced SQL Update Command: Using Two Tables
There are times that you need to update one SQL database table, and want to use values from another table to do the update with. Here is how you would do that in ASP.
Create a Table with SQL Syntax
Need to create a table to put data in? It´s very easy to put together SQL Syntax to build the table to store your newsletter members, poll votes, or more.
DELETE - Deleting in SQL
One of the most dangerous commands you can issue is the DELETE command. Be very cautious that you use this command properly, lest you find your entire table wiped out.
Handling Apostrophes in ASP and SQL
One of the most troubling parts of ASP and SQL for new programmers can be how to handle apostrophes. Here is a guide to getting those apostrophes working properly.
Inserting Into a Database with ASP
The INSERT command is very commonly used in ASP to add rows into a SQL database. Here is the syntax for inserting into your tables.
Joining Tables in SQL
Do you have two tables, and want to be able to calculate totals and merge information across them? Just join them together!
Like Statement in SQL - Inexact Wildcard Matches
If you´re writing a SQL statement, sometimes you want wildcarded matches. The LIKE command lets you get matches that are similar to a phrase you supply.
MAX - Selecting a Maximum Number in SQL
SQL provides an easy to use method of determining the largest, or maximum, number in a database. This can get you the largest salary, next available ID number, and much more.
MIN - Selecting a Minimum Number in SQL
SQL has many handy, built in functions. One of those is MIN, which gets you the smallest number in a set.
MoveNext Record Set Function
When you´re working with a set of records in ASP, you want some way to move from record to record. The MoveNext function lets you do that.
RecordCount and Count
If you´re trying to figure out how many records are in a given SQL result set, you can use either the RecordCount or Count command. Both work in different ways.
Selecting All Rows from a Table
There are many times that you will want to select all rows from a given database table. How do you move through the records, and display the data?
Selecting from a Database
You understand the basics of using ASP, including loops and requests. Now you want to use this knowledge to select information out of a database. Here´s how you do it!
Syntax of a SQL Select Statement
The most common thing to do with ASP is show information stored in a database. Here are the basics of the SQL Select statement, to get that information.
Updating a SQL Database with ASP ASP Homepage | Editor's Picks Articles | Top Ten Articles | ASP Site Map
Often, you´ll want to use ASP to update a database record using SQL. Here is how it is done!
Think your link belongs here? Use the contact page to let this editor know.