Archive for January 2011

Double Saving Sale- From uCertify

uCertify has helped thousands of professionals to achieve their IT certification goals. We have another offer to make you get certified in a better way. You are free to buy any 2 Prepkits of your choice for only $179.99 for 3 days only. That’s a 36% savings off our regular prices.
Our outstanding pass rate of over 98% is great testimony to the quality of our products.
So, hurry! Sale begins Jan 31st and ends Feb 2nd. Any two Prepkits for only $179.99 ( as compared to $279.98 )! To order, go to:

https://www.ucertify.com/cart/todays-deal.php

Share

DELETE and TRUNCATE commands

DELETE and TRUNCATE are two commands that remove rows from a table but each will do it in a different manner. DELETE removes rows and places them in the Undo tablespace, thus it requires COMMIT to confirm the delete operation. TRUNCATE, on the other hand, is an Auto Commit operation and hence, does not require COMMIT to confirm the removal. TRUNCATE does not have the WHERE clause so it is better to use TRUCATE when all rows are to be deleted from the table. Also TRUNCATE being Auto Commit, uses minimum Undo tablespace. If rows from a table are to be removed conditionally, then DELETE statement with the WHERE clause should be used. The condition is given in the WHERE clause and DELETE removes only those rows that satisfy the given condition. If no WHERE clause is specified, then all the rows in the table are deleted. Note: It must be assured that the WHERE clause is included in DELETE whenever required, as without the WHERE clause, the DELETE statement could lead to unwanted consequences.

Share

Delete operator

The delete operator is used to remove the elements of an array. The operator does not actually remove the elements of an array. It just sets the elements as undefined. The delete operator requires the array name and the array index to delete the elements. The syntax for using the delete operator is as follows: delete arrayName(arrayindex) The following example will demonstrate the use of the delete operator: var myArray=new Array(1,2,3,4,5); trace (myArray); delete myArray[0]; trace (myArray); //output: 1,2,3,4,5 //output: undefined,2,3,4,5

Share

DELETE method

The DELETE method is used to delete the elements of a collection. Syntax: Following are the three overloaded forms of the DELETE method: collectionname.DELETE It deletes all the elements of a collection and sets COUNT to 0. collectionname.DELETE(n) It deletes nth element from an associative array that has a numeric key or from a nested table.
collectionname.DELETE(x,y) It deletes the range of elements from x to y from an associative array or a nested table.

Note:

  • If n is NULL, no action is performed by DELETE(n).
  • If the element that is to be deleted does not exist, no exception is raised by DELETE(n).
  • If x is greater than y, no action is performed by DELETE(x,y).
  • If x or y is NULL, no action is performed by DELETE(x,y).

Example: DECLARE TYPE NbrLst IS TABLE OF INTEGER; n NbrLst := NbrLst (1,2,3,4,5); BEGIN DBMS_OUTPUT.PUT_LINE(‘There are ‘ || n.COUNT || ‘ elements.’); n.DELETE(2,5); — remove elements from 2 to 5 from the collection DBMS_OUTPUT.PUT_LINE(‘Now, there are ‘ || n.COUNT || ‘ elements.’); END; /

Share

DELETE statement

The DELETE statement is a Data Manipulation Language (DML) statement that is used to delete records from a table, based on the condition specified in the WHERE clause. If the WHERE clause is omitted, all records in the table are deleted. The DELETE statement can be rolled back. Syntax: DELETE [FROM] TableName [WHERE condition];

Share

DELETE clause

The DELETE clause is used to delete the values of the persistent fields on the basis of the WHERE clause. The following is the general syntax of the DELETE clause: DELETE FROM entity_name identification variable where_clause The following query is an example of the DELETE clause: DELETE FROM Employee e WHERE e.status = ‘absent’ AND e.department IS EMPTY Here, this query is used to delete all absent employees who do not belong to any department. Employee is an entity and status and department are the persistent fields. e is an identification variable of the entity Employee.

Share

Table data region

The table data region is used to arrange data in a tabular format, i.e., in rows and columns. The static set of columns are present in tables, and the number of rows in the table depends on the data in the dataset. It is possible to place as many columns as a user wants in the table. The table data region also allows multiple levels of data grouping and the inclusion of graphical elements within the table. With the help of Report Designer, it is possible to define tabular reports that contain table headers, group headers, table footers, group footers, and detail rows. A table data region can be added to a new blank report or an existing report. Tabular report can also be created automatically with the help of the report wizard.

Share

Table variable

A table variable is used to store a result set retrieved from a table. All data in the table is stored in the memory. If the available memory space is less than the required space, the overflow is transferred to the tempdb database. It is used in database objects such as stored procedures, functions and triggers. It is removed from the memory when the usage of an object is completed and the object is exited by the user. A table variable is local to the object in which it is created.

Share

Partitioned table

A partitioned table is a table that is broken down into smaller and more manageable pieces called partitions. Usually, a table is partitioned if it contains a very large amount of data. A table is partitioned on the basis of values in a column or set of columns known as partition key. Each partition of a partitioned table is allocated a segment and can be managed individually. All partitions of a partitioned table share the same logical attributes. For example, all partitions share the same column and constraint definitions. However, each partition can have different physical attributes. For example, each partition can be stored in a separate tablespace that can have different storage parameters. All partitions of a partitioned table can be stored in the same tablespace. However, storing partitions in separate tablespaces on separate disks reduces the possibility of data loss and enhances the performance of queries and other operations on the table. Moreover, storing partitions in separate tablespaces allows independent back up and recovery of each partition. Several operations on a partitioned table can be performed concurrently by assigning different parallel execution servers to different partitions of the table.

Share

Temporary table

A temporary table is an object that is created and stored temporarily by SQL Server in the tempdb database. The table can be created by any user by using either the CREATE TABLE statement or SELECT…INTO statement. The name of the temporary table is prefixed with a hash (#) sign. Temporary tables are of the following two types:
1. Local: A local temporary table is created by prefixing the table name with a single hash(#) sign. The table is visible only to the user who created it. The table can be deleted by using the DROP TABLE statement. The table is also deleted when the user closes the connection.

2. Global: A global temporary table is created by prefixing the table name with a double hash(#) sign. The table is visible to all the users who are connected to the database engine. The table can be deleted by using the DROP TABLE statement. It is also deleted when all the users close their connection.

Share