Chapter 11 – Upgrading Firmware And Managing Configurations

Retrieving A Table With The Where Clause

It is useful to be able to display specific rows of a table predicated upon the row
having parameters of a specific value. The addition of a “where” clause to the
select will limit the returned results. As an example, suppose that it desirable to
identify all ports on the switch operating in Auto Select mode.
Figure 73 Selecting rows in a table based upon parameter values
It is also possible to select rows based upon multiple parameters by and-ing or or-
ing comparisons in the where clause. Ensure that parentheses are used to enclose
the full where clause.
Figure 74 Selecting rows in a table based upon multiple parameter values
Changing Values In A Table
The “where” clause can be used to select rows in a table to modify. As an
example, suppose that it desirable to identify all ports on the switch operating in
100 Mbps full duplex with flow control disabled, and to enable flow control on
these ports.
Figure 75 Changing Values In A Table
Defaulting A Table
It is sometimes desirable to restore one table to its factory defaults without
modifying the remainder of the configuration. The sql default command allows an
individual table to be defaulted.
Figure 76 Defaulting A Table
> sql select from ethportcfg where Media_Type = Auto_Select
Port Name Status Media Type Flow Control FEFI Link Alarms
5 Port 7 Enabled Auto Select Enabled Disabled Enabled
6 Port 8 Enabled Auto Select Disabled Disabled Enabled
2 records selected
> sql select from ethportcfg where Media_Type = Auto_Select and Flow_control =
Disabled
Port Name Status Media Type Flow Control FEFI Link Alarms
6 Port 8 Enabled Auto Select Disabled Disabled Enabled
1 records selected
> sql update ethportcfg set flow_control=enabled where ( media_type = Auto_Select
and flow_control = disabled )
1 records updated
> sql default into ethportcfg
RuggedCom 105