Introduction To Database Commands

Various database commands covers Data Insertion,Data modification, Data Deletion,submitting queries to Database. In Creating a New Table screen, enter the table name and the number of fields required in the table. A table can have a maximum of 64 fields.

Syntax

Create an Instance of Table existing in Database

table tablename=databasename.tablename

For Retrieving the records from Table

The Select statement is used to retrieve rows from the database based on a query. You can select one or more rows or columns from one or more tables. The Select statement is powerful and can be as complex asyou require it. Typically, a Select statement syntax is as follows.

All clauses within box brackets [..] are optional.

Connection object specifies the connection instance to a table source from which rows are to be retrieved.

Search condition specifies the search condition to restrict the rows returned. Search condition is a combination of one or more expressions using logical operators such as AND and Or that returns TRUE, FALSE, or UNKNOWN. There is no limit to the number of expressions that can be included in a search condition. An expression is a column name, a constant, a function, a variable, or any combination of column names, constants, and functions connected by one or more operators.

Order expression specifies the column on which to sort the result set. ASC specifies that the values in the specified column should be sorted in ascending order, from lowest value to highest value. DESC specifies that the values in the specified column should be sorted in descending order, from highest value to lowest value
Logical operators
AND
Combines two conditions and evaluates to TRUE when both of the conditions are TRUE.

OR
Combines two conditions and evaluates to TRUE when either condition is TRUE.

Relational Operators
= tests the equality between two expressions.
<> tests the condition of two expressions not being equal to each other.
!= tests the condition of two expressions being equal to each other.
> tests the condition of one expression being greater than the other.
>= tests the condition of one expression being greater than or equal to the other expression
< tests the condition of one expression being less than the other.
<= tests the condition of one expression being less than or equal to the other expression.
like tests the condition of one expression being like the other expression.
string_expression is a string of characters and wildcard characters.

For Retrieving the values from form object and assigning to fieldnames in Table

tablename(fieldname1)=value retrieved from form object(TextBox,Textarea etc)
tablename(fieldname2)=value retrieved from form object(TextBox,Textarea etc)
.
.
For Inserting Record

tablename(insert)

For Modifying Record

tablename(modify)          

For Deleting Record

tablename(deleterecord)
        
Back