home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- REPLACE(QUEL) 2/29/79 REPLACE(QUEL)
-
-
-
- NAME
- replace - replace values of domains in a relation
-
- SYNOPSIS
- _r_e_p_l_a_c_e tuple_variable (target_list) [_w_h_e_r_e qual]
-
- DESCRIPTION
- _R_e_p_l_a_c_e changes the values of the domains specified in the
- _t_a_r_g_e_t__l_i_s_t for all tuples which satisfy the qualification
- _q_u_a_l. The _t_u_p_l_e__v_a_r_i_a_b_l_e must have been declared to range
- over the relation which is to be modified. Note that a tu-
- ple variable is required and not the relation name. Only
- domains which are to be modified need appear in the
- _t_a_r_g_e_t__l_i_s_t. These domains must be specified as
- result_attnames in the _t_a_r_g_e_t__l_i_s_t either explicitly or by
- default (see quel(quel)).
-
- Numeric domains may be replaced by values of any numeric
- type (with the exception noted below). Replacement values
- will be converted to the type of the result domain.
-
- Only the owner of a relation, or a user with replace pemis-
- sion on the relation can do _r_e_p_l_a_c_e.
-
- If the tuple update would violate an integrity constraint
- (see integrity(quel)), it is not done.
-
- EXAMPLE
- /* Give all employees who work for Smith a 10% raise */
- range of e is emp
- replace e(sal = 1.1 * e.sal) where e.mgr = "Smith"
-
- SEE ALSO
- integrity(quel), permit(quel), quel(quel), range(quel)
-
- DIAGNOSTICS
- Use of a numeric type expression to replace a character type
- domain or vice versa will produce diagnostics.
-
- BUGS
-
-
-