|
81. What do you mean by Table Sample?
TABLESAMPLE allows you to extract a sampling of rows from a table in the FROM clause. The rows retrieved are random and they are not in any order. This sampling can be based on a percentage of number of rows. You can use TABLESAMPLE when only a sampling of rows is necessary for the application instead of a full result set. |
82. What is the difference between UNION and UNION ALL?
83. What is B-Tree?
The database server uses a B-tree structure to organize index information. B-Tree generally has following types of index pages or nodes:
- UNION The UNION command is used to select related information from two tables, much like the JOIN command. However, when using the UNION command all selected columns need to be of the same data type. With UNION, only distinct values are selected.
- UNION ALL The UNION ALL command is equal to the UNION command, except that UNION ALL selects all values.
83. What is B-Tree?
The database server uses a B-tree structure to organize index information. B-Tree generally has following types of index pages or nodes:
- Root node: A root node contains node pointers to branch nodes which can be only one.
- Branch node: A branch node contains pointers to leaf nodes or other branch nodes which can be two or more.
- Leaf nodes: A leaf node contains index items and orizantal pointers to other leaf nodes which can be many.