0% found this document useful (0 votes)
38 views2 pages

SQL Statements Select Statement

The document summarizes key SQL statements used to interact with an operational database including: - The select statement allows users to retrieve specific desired information. The order by clause sorts data and results are in ascending order by default. And & or operators filter records based on multiple conditions. - The insert into statement inserts new rows of data into tables. It will be used to add new customer and sales records. - The update statement modifies existing rows of data in tables. It will mainly be used to update customer information and delivery status.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

SQL Statements Select Statement

The document summarizes key SQL statements used to interact with an operational database including: - The select statement allows users to retrieve specific desired information. The order by clause sorts data and results are in ascending order by default. And & or operators filter records based on multiple conditions. - The insert into statement inserts new rows of data into tables. It will be used to add new customer and sales records. - The update statement modifies existing rows of data in tables. It will mainly be used to update customer information and delivery status.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Statements

Select Statement
Select Statement allows the users to retrieve the specific information
they desire from an operational database.
Order By Clause
Order by Clause sorts data according to what the user desire. The
results are in ascending order in default.
And & Or Operators
And & Or operators are used to filter records based on more than one
condition. The and operator displays a record if all the condition are
met. The Or operator displays a record if any condition is met.
The select statement together with the order by clause and and & or
operators will be used to search and filter information in the database. This
will be mainly used for searching data in the sales table and customer table.
The sample format for this statement is Select * from tblSales where
Description=Credit
and
CustomerName=txtCustmerName.text
or
CustomerID=txtCustomerID.text.

Insert Into Statement


The insert into statement is used to insert a row of data in a table.
The insert into statement will be used to insert records in the
database tables such as customer record table and sales record table. Every
time a new customer registers, the information will be inserted in the
customer table; and every time a sales transaction occurs, the information
will be inserted to the sales table. The sample format for this statement is
Insert Into tblSales (CustomerID, Date&Time, Quantity, Price, ProductName,
Code, Amount, Mode, UserID, Status) Values (txtCustomerID.text,
lblDate&Time.Caption,
lblQuantity.Caption,
lblPrice.Caption,
lblProductName.Caption,
lblDescription.Caption,
lblAmount.Caption,
lblMode.Caption, lblUserID.caption, lblStatus.Caption).
Update Statement

The update statement is used to modify row of data in a table.


The update statement will be used to modify existing records.
This will be mainly used in updating customer information and
updating the status of delivery. The sample format for this statement is
Update
tblCustomers
Set
Address=txtAddress.Text
where

CustomerID=txtCustomerID.Text
CustomerName=txtCustomerName.Text.

or

You might also like