asp.net 2.0

How to use aggregate SQL Select statements

Web developer can use special aggregate SQL functions which work with a set of values but return only a single value. For example, Web developer can use use an aggregate function to count the number of records in a table or to calculate the average price of a product:

     – Avg(fieldname) – Calculates the average of all values in …

Learn more

How to perform string matching with the SQL Like operator

Web developer can use the SQL Like operator to perform partial string matching to filter records where a particular field starts with, end with, or contains a certain sets of characters. For example, if Web developer wants to see all store applicants names that start with C, he/she could use the following statement:

SELECT * FROM Applicants WHERE appl_fname …

Learn more

How to use alternative SQL Select statement

Web developer can use the Top clause instead of a Where clause. For example:

SELECT TOP 100 * FROM Orders ORDER_BY ord_date DESC

The database rows will be sorted in descending order by order date, and the first 100 matching results will be retrieved. In this case, it’s the 100 most recent orders. Web developer could also use this type …

Learn more

How to use a Where clause in SQL Select statements.

In many cases, the Where clause is the most important part of the Select statement. Web developer can find records that match several conditions using the And keyword, and he/she can find records that match any one of a series of conditions using the Or keyword. Web developer can also specify greater-than and less-than comparisons by using the …

Learn more

How to improve SQL Select statement

The following is an example of typical and inefficient Select statement. It works with the Clients table:

SELECT * FROM Clients

-The asterisk (*) retrieves all the columns in the table. This isn’t the best approach for a large table if a Web developer does not need all the information. It increases the amount of data that has to be …

Learn more

How to use SQL Select statement

Web developer can retrieve one or more rows of data, by using SQL select statement which has the following structure:

SELECT [columns]
FROM [tables]
WHERE [search_condition]
ORDER BY [order_expression ASC | DESC]

Related TutorialsHow to delete a database diagram in Object Explorer
How to disable a check constraint for replication in SQL server
How to save selected tables in SQL Server database diagram
How to disable …

Learn more

HtmlInputText class properties and its descriptions

The HtmlInputText control allows programmatic access to the HTML <input type= text> and <input type= password> elements on the server. The MaxLength property specifies the maximum number of characters that can be entered in the text box. The Size property allows Web developer to specify the width of the text box and he/she can use the Value property …

Learn more

HtmlInputSubmit class properties and its descriptions

The HtmlInputSubmit control allows programmatic access to the HTML <input type=submit> element on the server. The HtmlInputSubmit class is derived from the HtmlInputButton class and is used to create a button control on a Web page that submits a form. The HtmlInputSubmit control is often used with the HtmlInputReset control, which resets form controls to their initial values.

Namespace: …

Learn more

HtmlInputReset class properties and its descriptions

The HtmlInputReset control allows programmatic access to the HTML <input type=reset> element on the server. The HtmlInputReset class is derived from the HtmlInputButton class and is used to create a button control on a Web page that resets form controls to their initial values. The HtmlInputReset control is often used with the HtmlInputSubmit control, which is used to …

Learn more

HtmlInputRadioButton class properties and its descriptions

The HtmlInputRadioButton control allows programmatic access to the HTML <input type= radio> element on the server. Web developers use the HtmlInputRadioButton control to create a radio button on a Web page. The HtmlInputRadioButton control does not provide built-in functionality to display a caption for the radio button and Web developers have to use literal text in the Web …

Learn more