Mar 01

Filtering with WHERE

Database by Imam | 1 Comment »

The WHERE clause is a row filter that is used to restrict the output of rows (or tuples ) in a result set. When the WHERE clause is used, the SQL Server database engine selects the rows from the table for the result set that meet the conditions listed in the WHERE clause. So, as we have previously illustrated, if no WHERE clause is used in a query, the query will return all rows from the table.Following is the general syntax of a SELECT statement with a WHERE clause:

SELECT column-names
FROM   Table
WHERE  criteria

For example, consider the following query:

Popularity: 8% [?]

Mar 01

Displaying or SELECTing Rows or Tuples from a Table

Shout by Imam | No Comments »

In relational database terminology, a table is called a relation, and is denoted by the name of the relation followed by the columns (or attributes), as shown here:

Dependent(pno, dname, relationship, sex, age)

Popularity: 8% [?]

Jan 14

Function

Database by Imam | No Comments »

Function

User Defined Function (UDF) merupakan kumpulan code Transact SQL , yang dapat memuat parameter, dan return value, atau table.
UDF Type:
- Scalar function  nilai kembaliannya berupa single value.
- In Line Table functions mengembalikan variabel dalam bentuk single table yang dibuat oleh statement SELECT.
- Multi-statement Table Function. Function ini mengembalikan variabel table yang strukturnya dibuat secara manual, mirip dengan statement untuk membuat table. Type fungsi ini digunakan untuk manipulasi data yang kompleks didalam function.

Popularity: 6% [?]