WHERE CLAUSE

The WHERE clause is used to filter data to rows that meet a condition or set of conditions. Rows are often evaluated for conditions using comparison operators, logical operators, or both. On rarer occasions, methods for validating a value exists or is known for an attribute across rows are employed. Our exploration of the WHERE clause will begin by introducing the types of operators commonly used in SQL through simple examples. These examples will build onto your existing knowledge of the SELECT and FROM clauses. I will then showcase more complex examples of the WHERE clause incorporating operands or things involved in the testing of some condition.

Before reading further, consider reviewing the Example Data section below to familiarize yourself with the data being used throughout the examples on this page. If you are already familiar with the data, then skip to the Comparison Operators section

Example Data
The schemas, corresponding tables, and data used in the example problems can be found at livesql.oracle.com. To more easily follow the examples covered on this page, consider first reading the table descriptions below and reviewing each table’s contents. To review the data maintained in each table, click on the icon next to the table name. To hide the data, click the icon again.

oe.categories_tab
Contains information related to each product category and the hierarchal relationship between product categories and their corresponding parent category, if applicable. There is one row per product category.
category_namecategory_descriptioncategory_idparent_category_id
hardwarecomputer hardware and peripherals1090
hardware1monitors1110
hardware2printers1210
hardware3harddisks1310
hardware4memory components/upgrades1410
hardware5processors, sound and video cards, network cards, motherboards1510
hardware6keyboards, mouses, mouse pads1610
hardware7other peripherals (CD-ROM, DVD, tape cartridge drives, …)1710
hardware8miscellaneous hardware (cables, screws, power supplies …)1910
softwarecomputer software2090
software1spreadsheet software2120
software2word processing software2220
software3database software2320
software4operating systems2420
software5software development tools (including languages)2520
software6miscellaneous software2920
office equipmentoffice furniture and supplies3090
office1capitalizable assets (desks, chairs, phones …)3130
office2office supplies for daily use (pencils, erasers, staples, …)3230
office3manuals, other books3330
office4miscellaneous office supplies3930
online catalogcatalog of computer hardware, software, and office equipment90
oe.product_information
Contains information related to each product. There is one row per product.
product_idproduct_nameproduct_descriptioncategory_idweight_classwarranty_periodsupplier_idproduct_statuslist_pricemin_pricecatalog_url
1797Inkjet C/8/HQInkjet printer, color, 8 pages per minute, high resolution (photo quality). Memory: 16MB. Dimensions (HxWxD): 7.3 x 17.5 x 14 inch. Paper size: A4, US Letter, envelopes. Interface: Centronics parallel, IEEE 1284 compliant.1232102094orderable349288http://www.supp-102094.com/cat/hw/p1797.html
2459LaserPro 1200/8/BWProfessional black and white laserprinter, resolution 1200 dpi, 8 pages per second. Dimensions (HxWxD): 22.37 x 19.86 x 21.92 inch. Software: Enhanced driver support for SPNIX v4.0; MS-DOS Built-in printer drivers: ZoomSmart scaling technology, billboard, handout, mirror, watermark, print preview, quick sets, emulate laserprinter margins.1253102099under development699568http://www.supp-102099.com/cat/hw/p2459.html
3127LaserPro 600/6/BWStandard black and white laserprinter, resolution 600 dpi, 6 pages per second. Interface: Centronics parallel, IEEE 1284 compliant. Memory: 8MB 96KB receiver buffer. MS-DOS ToolBox utilities for SPNIX AutoCAM v.17 compatible driver.1243102087orderable498444http://www.supp-102087.com/cat/hw/p3127.html
2254HD 10GB /I10GB capacity hard disk drive (internal). These drives are intended for use in today’s demanding, data-critical enterprise environments and are ideal for use in RAID applications. Universal option kits are configured and pre-mounted in the appropriate hot plug tray for immediate installation into your corporate server or storage system.1322102071obsolete453371http://www.supp-102071.com/cat/hw/p2254.html
3353HD 10GB /R10GB Removable hard disk drive for 10GB Removable HD drive. Supra7 disk drives provide the latest technology to improve enterprise performance, increasing the maximum data transfer rate up to 160MB/s.1313102071obsolete489413http://www.supp-102071.com/cat/hw/p3353.html
3069HD 10GB /S10GB hard disk drive for Standard Mount. Backward compatible with Supra5 systems, users are free to deploy and re-deploy these drives to quickly deliver increased storage capacity. Supra drives eliminate the risk of firmware incompatibility.1312102051obsolete436350http://www.supp-102051.com/cat/hw/p3069.html
2253HD 10GB @5400 /SE10GB capacity hard disk drive (external) SCSI interface, 5400 RPM. Universal option kits are configured and pre-mounted in the appropriate hot plug tray for immediate installation into your corporate server or storage system. Supra drives eliminate the risk of firmware incompatibility.1323102069obsolete399322http://www.supp-102069.com/cat/hw/p2253.html
3354HD 12GB /I12GB capacity harddisk drive (internal). Supra drives eliminate the risk of firmware incompatibility. Backward compatibility: You can mix or match Supra2 and Supra3 devices for optimized solutions and future growth.1322102066orderable543478http://www.supp-102066.com/cat/hw/p3354.html
3072HD 12GB /N12GB hard disk drive for Narrow Mount. Supra9 hot pluggable hard disk drives provide the ability to install or remove drives on-line. Our hot pluggable hard disk drives are required to meet our rigorous standards for reliability and performance.1313102061orderable567507http://www.supp-102061.com/cat/hw/p3072.html
3334HD 12GB /R12GB Removable hard disk drive. With compatibility across many enterprise platforms, you are free to deploy and re-deploy this drive to quickly deliver increased storage capacity. Supra7 Universal disk drives are the second generation of high performance hot plug drives sharing compatibility across corporate servers and external storage enclosures.1323102090orderable612512http://www.supp-102090.com/cat/hw/p3334.html
3071HD 12GB /S12GB hard disk drive for Standard Mount. Supra9 hot pluggable hard disk drives provide the ability to install or remove drives on-line. Our hot pluggable hard disk drives are required to meet our rigorous standards for reliability and performance.1313102071orderable633553http://www.supp-102071.com/cat/hw/p3071.html
2255HD 12GB @7200 /SE12GB capacity hard disk drive (external) SCSI, 7200 RPM. These drives are intended for use in today’s demanding, data-critical enterprise environments and can be used in RAID applications. Universal option kits are configured and pre-mounted in the appropriate hot plug tray for immediate installation into your corporate server or storage system.1322102057orderable775628http://www.supp-102057.com/cat/hw/p2255.html
1743HD 18.2GB @10000 /EExternal hard drive disk – 18.2 GB, rated up to 10,000 RPM. These drives are intended for use in today’s demanding, data-critical enterprise environments and are ideal for use in RAID applications.1333102078planned800661http://www.supp-102078.com/cat/hw/p1743.html
2382HD 18.2GB@10000 /I18.2 GB SCSI hard disk @ 10000 RPM (internal). Supra7 Universal disk drives provide an unequaled level of investment protection and simplification for customers by enabling drive compatibility across many enterprise platforms.1333102050under development850731http://www.supp-102050.com/cat/hw/p2382.html
3399HD 18GB /SE18GB SCSI external hard disk drive. Supra5 Universal hard disk drives provide the ability to hot plug between various servers, RAID arrays, and external storage shelves.1332102083under development815706http://www.supp-999999.com/cat/hw/p3333.html
3073HD 6GB /I6GB capacity hard disk drive (internal). Supra drives eliminate the risk of firmware incompatibility.1325102072obsolete224197http://www.supp-102083.com/cat/hw/p3073.html
1768HD 8.2GB @5400Hard drive disk – 8.2 GB, rated up to 5,400 RPM. Supra drives eliminate the risk of firmware incompatibility. Standard serial RS-232 interface.1322102093orderable345306http://www.supp-102093.com/cat/hw/p1768.html
2410HD 8.4GB @54008.4 GB hard disk @ 5400 RPM. Reduced cost of ownership: Drives can be utilized across enterprise platforms. This hot pluggable hard disk drive is required to meet your rigorous standards for reliability and performance.1323102061orderable357319http://www.supp-102061.com/cat/hw/p2410.html
2257HD 8GB /I8GB capacity hard disk drive (internal). Supra9 hot pluggable hard disk drives provide the ability to install or remove drives on-line. Backward compatibility: You can mix Supra2 and Supra3 devices for optimized solutions and future growth.1313102061orderable399338http://www.supp-102061.com/cat/hw/p2257.html
3400HD 8GB /SE8GB capacity SCSI hard disk drive (external). Supra7 disk drives provide the latest technology to improve enterprise performance, increasing the maximum data transfer rate up to 255MB/s.1323102063orderable389337http://www.supp-102063.com/cat/hw/p3400.html
3355HD 8GB /SI8GB SCSI hard disk drive, internal. With compatibility across many enterprise platforms, you are free to deploy and re-deploy this drive to quickly deliver increased storage capacity. 1312102050orderablehttp://www.supp-102050.com/cat/hw/p3355.html
1772HD 9.1GB @10000Hard disk drive – 9.1 GB, rated up to 10,000 RPM. These drives are intended for use in data-critical enterprise environments. Ease of doing business: you can easily select the drives you need regardless of the application in which they will be deployed.1335102070orderable456393http://www.supp-102070.com/cat/hw/p1772.html
2243Monitor 17/HR/FMonitor 17 inch (16 viewable) high resolution, flat screen. High density photon gun with Enhanced Elliptical Correction System for more consistent, accurate focus across the screen, even in the corners.114-6102060orderable350302http://www.supp-102060.com/cat/hw/p2243.html
3057Monitor 17/SDCRT Monitor 17 inch (16 viewable) short depth. Delivers outstanding image clarity and precision. Gives professional color, technical engineering, and visualization/animation users the color fidelity they demand, plus a large desktop for enhanced productivity.114-6102055orderable369320http://www.supp-102055.com/cat/hw/p3057.html
3061Monitor 19/SDCRT Monitor 19 inch (18 viewable) short depth. High-contrast black screen coating: produces superior contrast and grayscale performance. The newly designed, amplified professional speakers with dynamic bass response bring all of your multimedia audio experiences to life with crisp, true-to-life sound and rich, deep bass tones. Plus, color-coded cables, simple plug-and-play setup and digital on-screen controls mean you are ready to set your sights on outrageous multimedia and the incredible Internet in just minutes.115-9102094orderable499437http://www.supp-102094.com/cat/hw/p3061.html
2245Monitor 19/SD/MMonitor 19 (18 Viewable) short depth, Monochrome. Outstanding image performance in a compact design. A simple, on-screen dislay menu helps you easily adjust screen dimensions, colors and image attributes. Just plug your monitor into your PC and you are ready to go.115-9102053orderable512420http://www.supp-102053.com/cat/hw/p2245.html
3065Monitor 21/DCRT Monitor 21 inch (20 viewable). Digital OptiScan technology: supports resolutions up to 1600 x 1200 at 75Hz. Dimensions (HxWxD): 8.3 x 18.5 x 15 inch. The detachable or attachable monitor-powered Platinum Series speakers offer crisp sound and the convenience of a digital audio player jack. Just plug in your digital audio player and listen to tunes without powering up your PC.1151102051orderable999875http://www.supp-102051.com/cat/hw/p3065.html
3331Monitor 21/HR21 inch monitor (20 inch viewable) high resolution. This monitor is ideal for business, desktop publishing, and graphics-intensive applications. Enjoy the productivity that a large monitor can bring via more workspace for running applications.1151102083orderable879785http://www.supp-102083.com/cat/hw/p3331.html
2252Monitor 21/HR/MMonitor 21 inch (20 viewable) high resolution, monochrome. Unit size: 35.6 x 29.6 x 33.3 cm (14.6 kg) Package: 40.53 x 31.24 x 35.39 cm (16.5 kg). Horizontal frequency 31.5 – 54 kHz, Vertical frequency 50 – 120 Hz. Universal power supply 90 – 132 V, 50 – 60 Hz.115-5102079obsolete889717http://www.supp-102079.com/cat/hw/p2252.html
3064Monitor 21/SDMonitor 21 inch (20 viewable) short depth. Features include a 0.25-0.28 Aperture Grille Pitch, resolution support up to 1920 x 1200 at 76Hz, on-screen displays, and a conductive anti-reflective film coating.115-5102096planned1023909http://www.supp-102096.com/cat/hw/p3064.html
3155Monitor Hinge – HDMonitor Hinge, heavy duty, maximum monitor weight 30 kg11410102092orderable4942http://www.supp-102092.com/cat/hw/p3155.html
3234Monitor Hinge – STDStandard Monitor Hinge, maximum monitor weight 10 kg11310102072orderable3934http://www.supp-102072.com/cat/hw/p3234.html
3350Plasma Monitor 10/LE/VGA10 inch low energy plasma monitor, VGA resolution1131102068orderable740630http://www.supp-102068.com/cat/hw/p3350.html
2236Plasma Monitor 10/TFT/XGA10 inch TFT XGA flatscreen monitor for laptop computers1131102090under development964863http://www.supp-102090.com/cat/hw/p2236.html
3054Plasma Monitor 10/XGA10 inch standard plasma monitor, XGA resolution. This virtually-flat, high-resolution screen delivers outstanding image quality with reduced glare.1131102060orderable600519http://www.supp-102060.com/cat/hw/p3054.html
1782Compact 400/DQ400 characters per second high-speed draft printer. Dimensions (HxWxD): 17.34 x 24.26 x 26.32 inch. Interface: RS-232 serial (9-pin), no expansion slots. Paper size: A4, US Letter.124-5102088obsolete125108http://www.supp-102088.com/cat/hw/p1782.html
2430Compact 400/LQ400 characters per second high-speed letter-quality printer. Dimensions (HxWxD): 12.37 x 27.96 x 23.92 inch. Interface: RS-232 serial (25-pin), 3 expansion slots. Paper size: A2, A3, A4.1242102087orderable175143http://www.supp-102087.com/cat/hw/p2430.html
1792Industrial 600/DQWide carriage color capability 600 characters per second high-speed draft printer. Dimensions (HxWxD): 22.31 x 25.73 x 20.12 inch. Paper size: 3×5 inch to 11×17 inch full bleed wide format.1245102088orderable225180http://www.supp-102088.com/cat/hw/p1792.html
1791Industrial 700/HD700 characters per second dot-matrix printer with harder body and dust protection for industrial uses. Interface: Centronics parallel, IEEE 1284 compliant. Paper size: 3×5 inch to 11×17 inch full bleed wide format. Memory: 4MB. Dimensions (HxWxD): 9.3 x 16.5 x 13 inch.1255102086orderable275239http://www.supp-102086.com/cat/hw/p1791.html
2302Inkjet B/6Inkjet Printer, black and white, 6 pages per minute, resolution 600×300 dpi. Interface: Centronics parallel, IEEE 1284 compliant. Dimensions (HxWxD): 7.3 x 17.5 x 14 inch. Paper size: A3, A4, US legal. No expansion slots.1232102096orderable150121http://www.supp-102096.com/cat/hw/p2302.html
2453Inkjet C/4Inkjet Printer, color (with two separate ink cartridges), 6 pages per minute black and white, 4 pages per minute color, resolution 600×300 dpi. Interface: Biodirectional IEEE 1284 compliant parallel interface and RS-232 serial (9-pin) interface 2 open EIO expansion slots. Memory: 8MB 96KB receiver buffer.1232102090orderable195174http://www.supp-102090.com/cat/hw/p2453.html
2810Inkvisible PensRollerball pen is equipped with a smooth precision tip. See-through rubber grip allows for a visible ink supply and comfortable writing. 4-pack with 1 each, black, blue, red, green.3210103095orderable64http://www.supp-103095.com/cat/off/p2810.html
2870Pencil – MechErgonomically designed mechanical pencil for improved writing comfort. Refillable erasers and leads. Available in three lead sizes: .5mm (fine); .7mm (medium); and .9mm (thick).3212103097orderable54http://www.supp-103097.com/cat/off/p2870.html
1781CDW 20/48/ECD Writer, read 48x, write 20x172-9102060orderable233206http://www.supp-102060.com/cat/hw/p1781.html
2264CDW 20/48/ICD-ROM drive: read 20x, write 48x (internal)172-9102060orderable223181http://www.supp-102060.com/cat/hw/p2264.html
2260DFD 1.44/3.5Dual Floppy Drive – 1.44 MB – 3.5172-6102062orderable6754http://www.supp-102062.com/cat/hw/p2260.html
2266DVD 12xDVD-ROM drive: speed 12x1731102099orderable333270http://www.supp-102099.com/cat/hw/p2266.html
3077DVD 8xDVD – ROM drive, 8x speed. Will probably become obsolete pretty soon…1731102099orderable274237http://www.supp-102099.com/cat/hw/p3077.html
2259FD 1.44/3.5Floppy Drive – 1.44 MB High Density capacity – 3.5 inch chassis171-9102086orderable3932http://www.supp-102086.com/cat/hw/p2259.html
2261FD 1.44/3.5/EFloppy disk drive – 1.44 MB (high density) capacity – 3.5 inch (external)172-9102086orderable4237http://www.supp-102086.com/cat/hw/p2261.html
3082Modem – 56/90/EModem – 56kb per second, v.90 PCI Global compliant. External; for power supply 110V.1711102068orderable8172http://www.supp-102068.com/cat/hw/p3082.html
2270Modem – 56/90/IModem – 56kb per second, v.90 PCI Global compliant. Internal, for standard chassis (3.5 inch).1711102068orderable6656http://www.supp-102068.com/cat/hw/p2270.html
2268Modem – 56/H/EStandard Hayes compatible modem – 56kb per second, external. Power supply: 220V.1711102068obsolete7767http://www.supp-102068.com/cat/hw/p2268.html
3083Modem – 56/H/IStandard Hayes modem – 56kb per second, internal, for standard 3.5 inch chassis.1711102068orderable6756http://www.supp-102068.com/cat/hw/p3083.html
2374Modem – C/100DOCSIS/EURODOCSIS 1.0/1.1-compliant external cable modem172-5102064orderable6554http://www.supp-102064.com/cat/hw/p2374.html
1740TD 12GB/DATTape drive – 12 gigabyte capacity, DAT format.172-5102075orderable134111http://www.supp-102075.com/cat/hw/p1740.html
2409TD 7GB/8Tape drive, 7GB capacity, 8mm cartridge tape.172-5102054orderable210177http://www.supp-102054.com/cat/hw/p2409.html
2262ZIP 100ZIP Drive, 100 MB capacity (external) plus cable for parallel port connection172-5102054orderable9881http://www.supp-102054.com/cat/hw/p2262.html
2522Battery – ELExtended life battery, for laptop computers192-3102078orderable4439http://www.supp-102078.com/cat/hw/p2522.html
2278Battery – NiHMRechargeable NiHM battery for laptop computers191-3102078orderable5548http://www.supp-102078.com/cat/hw/p2278.html
2418Battery Backup (DA-130)Single-battery charger with LED indicators191-3102074orderable6152http://www.supp-102074.com/cat/hw/p2418.html
2419Battery Backup (DA-290)Two-battery charger with LED indicators191-3102074orderable7260http://www.supp-102074.com/cat/hw/p2419.html
3097Cable Connector – 32RCable Connector – 32 pin ribbon1910102055orderable32http://www.supp-102055.com/cat/hw/p3097.html
3099Cable HarnessCable harness to organize and bundle computer wiring1910102055orderable43http://www.supp-102055.com/cat/hw/p3099.html
2380Cable PR/15/P15 foot parallel printer cable192-1102055orderable65http://www.supp-102055.com/cat/hw/p2380.html
2408Cable PR/P/6Standard Centronics 6ft printer cable, parallel port191-1102055orderable43http://www.supp-102055.com/cat/hw/p2408.html
2457Cable PR/S/6Standard RS232 serial printer cable, 6 feet191-1102055orderable54http://www.supp-102055.com/cat/hw/p2457.html
2373Cable RS232 10/AF10 ft RS232 cable with F/F and 9F/25F adapters1921102055orderable64http://www.supp-102055.com/cat/hw/p2373.html
1734Cable RS232 10/AM10 ft RS232 cable with M/M and 9M/25M adapters1921102055orderable65http://www.supp-102055.com/cat/hw/p1734.html
1737Cable SCSI 10/FW/ADS10ft SCSI2 F/W Adapt to DSxx0 Cable192-2102095orderable86http://www.supp-102095.com/cat/hw/p1737.html
1745Cable SCSI 20/WD->D20ft SCSI2 Wide Disk Store to Disk Store Cable192-2102095orderable97http://www.supp-102095.com/cat/hw/p1745.html
2982Drive Mount – ADrive Mount assembly kit192-1102057orderable4435http://www.supp-102057.com/cat/hw/p2982.html
3277Drive Mount – A/TDrive Mount assembly kit for tower PC1921102057orderable3629http://www.supp-102057.com/cat/hw/p3277.html
2976Drive Mount – DDrive Mount for desktop PC1921102057orderable5244http://www.supp-102057.com/cat/hw/p2976.html
3204Envoy DSEnvoy Docking Station1932102060orderable126107http://www.supp-102060.com/cat/hw/p3204.html
2638Envoy DS/EEnhanced Envoy Docking Station1932102060orderable137111http://www.supp-102060.com/cat/hw/p2638.html
3020Envoy ICEnvoy Internet Computer, Plug&Play1941102060orderable449366http://www.supp-102060.com/cat/hw/p3020.html
1948Envoy IC/58Internet computer with built-in 58K modem194-5102060orderable498428http://www.supp-102060.com/cat/hw/p1948.html
3003Laptop 128/12/56/v90/110Envoy Laptop, 128MB memory, 12GB hard disk, v90 modem, 110V power supply.194-5102060orderable32192606http://www.supp-102060.com/cat/hw/p3003.html
2999Laptop 16/8/110Envoy Laptop, 16MB memory, 8GB hard disk, 110V power supply (US only).193-5102060obsolete999800http://www.supp-102060.com/cat/hw/p2999.html
3000Laptop 32/10/56Envoy Laptop, 32MB memory, 10GB hard disk, 56K Modem, universal power supply (switchable).194-5102060orderable17491542http://www.supp-102060.com/cat/hw/p3000.html
3001Laptop 48/10/56/110Envoy Laptop, 48MB memory, 10GB hard disk, 56K modem, 110V power supply.194-5102060obsolete25562073http://www.supp-102060.com/cat/hw/p3001.html
3004Laptop 64/10/56/220Envoy Laptop, 64MB memory, 10GB hard disk, 56K modem, 220V power supply.194-5102060orderable27682275http://www.supp-102060.com/cat/hw/p3004.html
3391PS 110/220Power Supply – switchable, 110V/220V192-5102062orderable8575http://www.supp-102062.com/cat/hw/p3391.html
3124PS 110V /TPower supply for tower PC, 110V1921102062orderable8470http://www.supp-102062.com/cat/hw/p3124.html
1738PS 110V /US110 V Power Supply – US compatible1921102062orderable8670http://www.supp-102062.com/cat/hw/p1738.html
2377PS 110V HS/US110 V hot swappable power supply – US compatible1921102062orderable9782http://www.supp-102062.com/cat/hw/p2377.html
2299PS 12V /PPower Supply – 12v portable1921102062orderable7664http://www.supp-102062.com/cat/hw/p2299.html
2414HD 9.1GB @10000 /I9.1 GB SCSI hard disk @ 10000 RPM (internal). Supra7 disk drives are available in 10,000 RPM spindle speeds and capacities of 18GB and 9.1 GB. SCSI and RS-232 interfaces.1335102098orderable454399http://www.supp-102098.com/cat/hw/p2414.html
2415HD 9.1GB @72009.1 GB hard disk @ 7200 RPM. Universal option kits are configured and pre-mounted in the appropriate hot plug tray for immediate installation into your corporate server or storage system.1335102063orderable359309http://www.supp-102063.com/cat/hw/p2415.html
239532MB Cache /M32MB Mirrored cache memory (100-MHz Registered SDRAM)141-6102093orderable123109http://www.supp-102093.com/cat/hw/p2395.html
175532MB Cache /NM32MB Non-Mirrored cache memory141-6102076orderable12199http://www.supp-102076.com/cat/hw/p1755.html
240664MB Cache /M64MB Mirrored cache memory141-6102059orderable223178http://www.supp-102059.com/cat/hw/p2406.html
240464MB Cache /NM64 MB Non-mirrored cache memory. FPM memory chips are implemented on 5 volt SIMMs, but are also available on 3.3 volt DIMMs.141-6102087orderable221180http://www.supp-102087.com/cat/hw/p2404.html
17708MB Cache /NM8MB Non-Mirrored Cache Memory (100-MHz Registered SDRAM)141-6102050orderable73http://www.supp-102050.com/cat/hw/p1770.html
24128MB EDO Memory8 MB 8×32 EDO SIM memory. Extended Data Out memory differs from FPM in a small, but significant design change. Unlike FPM, the data output drivers for EDO remain on when the memory controller removes the column address to begin the next cycle. Therefore, a new data cycle can begin before the previous cycle has completed. EDO is available on SIMMs and DIMMs, in 3.3 and 5 volt varieties.141-6102058obsolete9883http://www.supp-102058.com/cat/hw/p2412.html
2378DIMM – 128 MB128 MB DIMM memory. The main reason for the change from SIMMs to DIMMs is to support the higher bus widths of 64-bit processors. DIMMs are 64- or 72-bits wide; SIMMs are only 32- or 36-bits wide (with parity).141-6102050orderable305247http://www.supp-102050.com/cat/hw/p2378.html
3087DIMM – 16 MBCitrus OLX DIMM – 16 MB capacity.141-6102081obsolete12499http://www.supp-102081.com/cat/hw/p3087.html
2384DIMM – 1GBMemory DIMM: RAM – 1 GB capacity.141-6102074under development599479http://www.supp-102074.com/cat/hw/p2384.html
1749DIMM – 256MBMemory DIMM: RAM 256 MB. (100-MHz Registered SDRAM)141-6102053orderable337300http://www.supp-102053.com/cat/hw/p1749.html
1750DIMM – 2GBMemory DIMM: RAM, 2 GB capacity.141-6102052orderable699560http://www.supp-102052.com/cat/hw/p1750.html
2394DIMM – 32MB32 MB DIMM Memory upgrade141-6102054orderable128106http://www.supp-102054.com/cat/hw/p2394.html
2400DIMM – 512 MB512 MB DIMM memory. Improved memory upgrade granularity: Fewer DIMMs are required to upgrade a system than it would require if using SIMMs in the same system. Increased maximum memory ceilings: Given the same number of memory slots, the maximum memory of a system using DIMMs is more than one using SIMMs. DIMMs have separate contacts on each side of the board, which provide two times the data rate as one SIMM.1411102098under development448380http://www.supp-102098.com/cat/hw/p2400.html
1763DIMM – 64MBMemory DIMM: RAM, 64MB (100-MHz Unregistered ECC SDRAM)1411102069orderable247202http://www.supp-102069.com/cat/hw/p1763.html
2396EDO – 32MBMemory EDO SIM: RAM, 32 MB (100-MHz Unregistered ECC SDRAM). Like FPM, EDO is available on SIMMs and DIMMs, in 3.3 and 5 volt varieties If EDO memory is installed in a computer that was not designed to support it, the memory may not work.141-6102051orderable179149http://www.supp-102051.com/cat/hw/p2396.html
2272RAM – 16 MBMemory SIMM: RAM – 16 MB capacity.1411102074obsolete135110http://www.supp-102074.com/cat/hw/p2272.html
2274RAM – 32 MBMemory SIMM: RAM – 32 MB capacity.1411102064orderable161135http://www.supp-102064.com/cat/hw/p2274.html
3090RAM – 48 MBRandom Access Memory, SIMM – 48 MB capacity.1411102084orderable193170http://www.supp-102084.com/cat/hw/p3090.html
1739SDRAM – 128 MBSDRAM memory, 128 MB capacity. SDRAM can access data at speeds up to 100 MHz, which is up to four times as fast as standard DRAMs. The advantages of SDRAM can be fully realized, however, only by computers designed to support SDRAM. SDRAM is available on 5 and 3.3 volt DIMMs.141-9102077orderable299248http://www.supp-102077.com/cat/hw/p1739.html
3359SDRAM – 16 MBSDRAM memory upgrade module, 16 MB. Synchronous Dynamic Random Access Memory was introduced after EDO. Its architecture and operation are based on those of the standard DRAM, but SDRAM provides a revolutionary change to main memory that further reduces data retrieval times. SDRAM is synchronized to the system clock that controls the CPU. This means that the system clock controlling the functions of the microprocessor also controls the SDRAM functions. This enables the memory controller to know on which clock cycle a data request will be ready, and therefore eliminates timing delays.141-9102059orderable11199http://www.supp-102059.com/cat/hw/p3359.html
3088SDRAM – 32 MBSDRAM module with ECC – 32 MB capacity. SDRAM has multiple memory banks that can work simultaneously. Switching between banks allows for a continuous data flow.141-9102057orderable258220http://www.supp-102057.com/cat/hw/p3088.html
2276SDRAM – 48 MBMemory SIMM: RAM – 48 MB. SDRAM can operate in burst mode. In burst mode, when a single data address is accessed, an entire block of data is retrieved rather than just the one piece. The assumption is that the next piece of data that will be requested will be sequential to the previous. Since this is usually the case, data is held readily available.141-9102058orderable269215http://www.supp-102058.com/cat/hw/p2276.html
3086VRAM – 16 MBCitrus Video RAM module – 16 MB capacity. VRAM is used by the video system in a computer to store video information and is reserved exclusively for video operations. It was developed to provide continuous streams of serial data for refreshing video screens.141-6102056orderable211186http://www.supp-102056.com/cat/hw/p3086.html
3091VRAM – 64 MBCitrus Video RAM memory module – 64 MB capacity. Physically, VRAM looks just like DRAM with added hardware called a shift register. The special feature of VRAM is that it can transfer one entire row of data (up to 256 bits) into this shift register in a single clock cycle. This ability significantly reduces retrieval time, since the number of fetches is reduced from a possible 256 to a single fetch. The main benefit of having a shift register available for data dumps is that it frees the CPU to refresh the screen rather than retrieve data, thereby doubling the data bandwidth. For this reason, VRAM is often referred to as being dual-ported. However, the shift register will only be used when the VRAM chip is given special instructions to do so. The command to use the shift register is built into the graphics controller.141-6102098orderable279243http://www.supp-102098.com/cat/hw/p3091.html
1787CPU D300Dual CPU @ 300Mhz. For light personal processing only, or file servers with less than 5 concurrent users. This product will probably become obsolete soon.1513102097orderable10190http://www.supp-102097.com/cat/hw/p1787.html
2439CPU D400Dual CPU @ 400Mhz. Good price/performance ratio; for mid-size LAN file servers (up to 100 concurrent users).1513102092orderable123105http://www.supp-102092.com/cat/hw/p2439.html
1788CPU D600Dual CPU @ 600Mhz. State of the art, high clock speed; for heavy load WAN servers (up to 200 concurrent users).1515102067orderable178149http://www.supp-102067.com/cat/hw/p1788.html
2375GP 1024×768Graphics Processor, resolution 1024 X 768 pixels. Outstanding price/performance for 2D and 3D applications under SPNIX v3.3 and v4.0. Double your viewing power by running two monitors from this single card. Two 17 inch monitors have more screen area than one 21 inch monitor. Excellent option for users that multi-task frequently or access data from multiple sources often.151-9102063orderable7869http://www.supp-102063.com/cat/hw/p2375.html
2411GP 1280×1024Graphics Processor, resolution 1280 X 1024 pixels. High end 3D performance at a mid range price: 15 million Gouraud shaded triangles per second, Optimized 3D drivers for MCAD and DCC applications, with user-customizable settings. 64MB DDR SDRAM unified frame buffer supporting true color at all supported standard resolutions.1511102061orderable9878http://www.supp-102061.com/cat/hw/p2411.html
1769GP 800×600Graphics processor, resolution 800 x 600 pixels. Remarkable value for users requiring great 2D capabilities or general 3D support for advanced applications. Drives incredible performance in highly complex models and frees the customer to focus on the design, instead of the rendering process.151-6102050orderable48http://www.supp-102050.com/cat/hw/p1769.html
2049MB – S300PC type motherboard, 300 Series.1521102082obsolete5547http://www.supp-102082.com/cat/hw/p2049.html
2751MB – S450PC type motherboard, 450 Series.1521102072orderable6654http://www.supp-102072.com/cat/hw/p2751.html
3112MB – S500PC type motherboard, 500 Series.152-5102086orderable7766http://www.supp-102086.com/cat/hw/p3112.html
2752MB – S550PC type motherboard for the 550 Series.152-5102086orderable8876http://www.supp-102086.com/cat/hw/p2752.html
2293MB – S600Motherboard, 600 Series.1522102086orderable9987http://www.supp-102086.com/cat/hw/p2293.html
3114MB – S900/650+PC motherboard, 900 Series; standard motherboard for all models 650 and up.1530102086under development10188http://www.supp-102086.com/cat/hw/p3114.html
3129Sound Card STDSound Card – standard version, with MIDI interface, line in/out, low impedance microphone input.151-6102090orderable4639http://www.supp-102090.com/cat/hw/p3129.html
3133Video Card /32Video Card, with 32MB cache memory.152-6102076orderable4841http://www.supp-102076.com/cat/hw/p3133.html
2308Video Card /E323-D ELSA Video Card, with 32 MB memory.152-6102087orderable5848http://www.supp-102087.com/cat/hw/p2308.html
2496WSP DA-130Wide storage processor DA-130 for storage subunits.1520102067planned299244http://www.supp-102067.com/cat/hw/p2496.html
2497WSP DA-290Wide storage processor (model DA-290).1530102053planned399355http://www.supp-102053.com/cat/hw/p2497.html
3106KB 101/ENStandard PC/AT Enhanced Keyboard (101/102-Key). Input locale: English (US).1611102066orderable4841http://www.supp-102066.com/cat/hw/p3106.html
2289KB 101/ESStandard PC/AT Enhanced Keyboard (101/102-Key). Input locale: Spanish.1611102055orderable4838http://www.supp-102055.com/cat/hw/p2289.html
3110KB 101/FRStandard PC/AT Enhanced Keyboard (101/102-Key). Input locale: French.1611102055orderable4839http://www.supp-102055.com/cat/hw/p3110.html
3108KB E/ENErgonomic Keyboard with two separate key areas, detachable numeric pad. Key layout: English (US).1622102055orderable7863http://www.supp-102055.com/cat/hw/p3108.html
2058Mouse +WPCombination of a mouse and a wrist pad for more comfortable typing and mouse operation.1611102055orderable2319http://www.supp-102055.com/cat/hw/p2058.html
2761Mouse +WP/CLSet consisting of a mouse and wrist pad, with corporate logo161-5102099planned2723http://www.supp-102099.com/cat/hw/p2761.html
3117Mouse C/EErgonomic, cordless mouse. With track-ball for maximum comfort and ease of use.1611102099orderable4135http://www.supp-102099.com/cat/hw/p3117.html
2056Mouse Pad /CLStandard mouse pad, with corporate logo1611102099planned86http://www.supp-102099.com/cat/hw/p2056.html
2211Wrist PadA foam strip to support your wrists when using a keyboard1611102072orderable43http://www.supp-102072.com/cat/hw/p2211.html
2944Wrist Pad /CLWrist Pad with corporate logo1611102063under development32http://www.supp-102063.com/cat/hw/p2944.html
1742CD-ROM 500/16xCD drive, read only, speed 16x, maximum capacity 500 MB.171-6102052orderable10181http://www.supp-102052.com/cat/hw/p1742.html
2402CD-ROM 600/E/24x600 MB external 24x speed CD-ROM drive (read only).172-9102052orderable127113http://www.supp-102052.com/cat/hw/p2402.html
2403CD-ROM 600/I/24x600 MB internal read only CD-ROM drive, reading speed 24x1721102052orderable117103http://www.supp-102052.com/cat/hw/p2403.html
1761CD-ROM 600/I/32x600 MB Internal CD-ROM Drive, speed 32x (read only).1721102052under development134119http://www.supp-102052.com/cat/hw/p1761.html
2381CD-ROM 8xCD Writer, read only, speed 8x171-3102052obsolete9982http://www.supp-102052.com/cat/hw/p2381.html
2424CDW 12/24CD Writer, speed 12x write, 24x read. Warning: will become obsolete very soon; this speed is not high enough anymore, and better alternatives are available for a reasonable price.172-6102075orderable221198http://www.supp-102075.com/cat/hw/p2424.html
1726LCD Monitor 11/PMLiquid Cristal Display 11 inch passive monitor. The virtually-flat, high-resolution screen delivers outstanding image quality with reduced glare.113-3102067under development259208http://www.www.supp-102067.com/cat/hw/p1726.html
2359LCD Monitor 9/PMLiquid Cristal Display 9 inch passive monitor. Enjoy the productivity that a small monitor can bring via more workspace on your desk. Easy setup with plug-and-play compatibility.113-3102061orderable249206http://www.www.supp-102061.com/cat/hw/p2359.html
3060Monitor 17/HRCRT Monitor 17 inch (16 viewable) high resolution. Exceptional image performance and the benefit of additional screen space. This monitor offers sharp, color-rich monitor performance at an incredible value. With a host of leading features, including on-screen display controls.114-6102081orderable299250http://www.supp-102081.com/cat/hw/p3060.html
3051Pens – 10/MPPermanent ink pen dries quickly and is smear resistant. Provides smooth, skip-free writing. Medium point. Single color boxes (black, blue, red) or assorted box (6 black, 3 blue, and 1 red).3210103097orderable1210http://www.supp-103097.com/cat/off/p3051.html
3150Card Holder – 25Card Holder; heavy plastic business card holder with embossed corporate logo. Holds about 25 of your business cards, depending on card thickness.321-6103089orderable1815http://www.supp-103089.com/cat/off/p3150.html
3208Pencils – WoodBox of 2 dozen wooden pencils. Specify lead type when ordering: 2H (double hard), H (hard), HB (hard black), B (soft black).3210103097orderable21http://www.supp-103097.com/cat/off/p3208.html
3209Sharpener – PencilElectric Pencil Sharpener Rugged steel cutters for long life. PencilSaver helps prevent over-sharpening. Non-skid rubber feet. Built-in pencil holder.3222103096orderable1311http://www.supp-103096.com/cat/off/p3209.html
3224Card Organizer – 250Portable holder for organizing business cards, capacity 250. Booklet style with slip in, transparent pockets for business cards. Optional alphabet tabs. Specify cover color when ordering (dark brown, beige, burgundy, black, and light grey).3215103095orderable3228http://www.supp-103095.com/cat/off/p3224.html
3225Card Organizer – 1000Holder for organizing business cards with alphabet dividers; capacity 1000. Desk top style with smoke grey cover and black base. Lid is removable for storing inside drawer.321-2103095orderable4739http://www.supp-103095.com/cat/off/p3225.html
3511Paper – HQ PrinterQuality paper for inkjet and laser printers tested to resist printer jams. Acid free for archival purposes. 22lb. weight with brightness of 92. Size: 8 1/2 x 11. Single 500-sheet ream.3220103080orderable97http://www.supp-103080.com/cat/off/p3511.html
3515Lead ReplacementRefill leads for mechanical pencils. Each pack contains 25 leads and a replacement eraser. Available in three lead sizes: .5mm (fine); .7mm (medium); and .9mm (thick).3210103095orderable21http://www.supp-103095.com/cat/off/p3515.html
2986Manual – Vision OS/2x +Manuals for Vision Operating System V 2.x and Vision Office Suite3330103095orderable125111http://www.supp-103095.com/cat/off/p2986.html
3163Manual – Vision Net6.3/USVision Networking V6.3 Reference Manual. US version with advanced encryption.3320103083orderable3529http://www.supp-103083.com/cat/off/p3163.html
3165Manual – Vision Tools2.0Vision Business Tools Suite V2.0 Reference Manual. Includes installation, configuration, and user guide.3320103083orderable4034http://www.supp-103083.com/cat/off/p3165.html
3167Manual – Vision OS/2.xVision Operating System V2.0/2.1/2/3 Reference Manual. Complete installation, configuration, management, and tuning information for Vision system administration. Note that this manual replaces the individual Version 2.0 and 2.1 manuals.3320103083orderable5547http://www.supp-103083.com/cat/off/p3167.html
3216Manual – Vision Net6.3Vision Networking V6.3 Reference Manual. Non-US version with basic encryption.3320103083orderable3026http://www.supp-103083.com/cat/off/p3216.html
3220Manual – Vision OS/1.2Vision Operating System V1.2 Reference Manual. Complete installation, configuration, management, and tuning information for Vision system administration.3320103083orderable4536http://www.supp-103083.com/cat/off/p3220.html
1729Chemicals – RCPCleaning Chemicals – 3500 roller clean pads3925103094orderable8066http://www.supp-103094.com/cat/off/p1729.html
1910FG Stock – HFiberglass Stock – heavy duty, 1 thick3930103083orderable1411http://www.supp-103083.com/cat/off/p1910.html
1912SS Stock – 3mmStainless steel stock – 3mm. Can be predrilled for standard power supplies, motherboard holders, and hard drives. Please use appropriate template to identify model number, placement, and size of finished sheet when placing order for drilled sheet.3920103083orderable1512http://www.supp-103083.com/cat/off/p1912.html
1940ESD Bracelet/ClipElectro static discharge bracelet with alligator clip for easy connection to computer chassis or other ground.391-5103095orderable1814http://www.supp-103095.com/cat/off/p1940.html
2030Latex GlovesLatex Gloves for assemblers, chemical handlers, fitters. Heavy duty, safety orange, with textured grip on fingers and thumb. Waterproof and shock-proof up to 220 volts/2 amps, 110 volts/5 amps. Acid proof for up to 5 minutes.39110103097orderable1210http://www.supp-103097.com/cat/off/p2030.html
2326Plastic Stock – YPlastic Stock – Yellow, standard quality.3910103093orderable21http://www.supp-103093.com/cat/off/p2326.html
2330Plastic Stock – RPlastic Stock – Red, standard quality.3910103093orderable21http://www.supp-103093.com/cat/off/p2330.html
2334ResinGeneral purpose synthetic resin.3920103087orderable43http://www.supp-103087.com/cat/off/p2334.html
2340Chemicals – SWCleaning Chemicals – 3500 staticide wipes3925103094orderable7259http://www.supp-103094.com/cat/off/p2340.html
2365Chemicals – TCSCleaning Chemical – 2500 transport cleaning sheets3935103094orderable7869http://www.supp-103094.com/cat/off/p2365.html
2594FG Stock – LFiberglass Stock – light weight for internal heat shielding, 1/4 thick3920103098orderable97http://www.supp-103098.com/cat/off/p2594.html
2596SS Stock – 1mmStainless steel stock – 3mm. Can be predrilled for standard model motherboard and battery holders. Please use appropriate template to identify model number, placement, and size of finished sheet when placing order for drilled sheet.3920103098orderable1210http://www.supp-103098.com/cat/off/p2596.html
2631ESD Bracelet/QRElectro Static Discharge Bracelet: 2 piece lead with quick release connector. One piece stays permanently attached to computer chassis with screw, the other is attached to the bracelet. Additional permanent ends available.391-5103085orderable1512http://www.supp-103085.com/cat/off/p2631.html
2721PC Bag – L/SBlack Leather Computer Case – single laptop capacity with pockets for manuals, additional hardware, and work papers. Adjustable protective straps and removable pocket for power supply and cables.3921103095orderable8770http://www.supp-103095.com/cat/off/p2721.html
2722PC Bag – L/DBlack Leather Computer Case – double laptop capacity with pockets for additional hardware or manuals and work papers. Adjustable protective straps and removable pockets for power supplies and cables. Double wide shoulder strap for comfort.3921103095orderable11299http://www.supp-103095.com/cat/off/p2722.html
2725Machine OilMachine Oil for Lubrication of CD-ROM drive doors and slides. Self-cleaning adjustable nozzle for fine to medium flow.3910103098orderable43http://www.supp-103098.com/cat/off/p2725.html
2782PC Bag – C/SCanvas Computer Case – single laptop capacity with pockets for manuals, additional hardware, and work papers. Adjustable protective straps and removable pocket for power supply and cables. Outside pocket with snap closure for easy access while travelling.392-6103095orderable6250http://www.supp-103095.com/cat/off/p2782.html
3187Plastic Stock – B/HDPlastic Stock – Blue, high density.3910103095orderable32http://www.supp-103095.com/cat/off/p3187.html
3189Plastic Stock – GPlastic Stock – Green, standard density.3910103095orderable21http://www.supp-103095.com/cat/off/p3189.html
3191Plastic Stock – OPlastic Stock – Orange, standard density.3910103095orderable21http://www.supp-103095.com/cat/off/p3191.html
3193Plastic Stock – W/HDPlastic Stock – White, high density.3910103095orderable32http://www.supp-103095.com/cat/off/p3193.html
3123PS 220V /DStandard power supply, 220V, for desktop computers.1921102062orderable8165http://www.supp-102062.com/cat/hw/p3123.html
1748PS 220V /EUR220 Volt Power supply type – Europe1921102053orderable8370http://www.supp-102053.com/cat/hw/p1748.html
2387PS 220V /FR220V Power supply type – France1921102053orderable8366http://www.supp-102053.com/cat/hw/p2387.html
2370PS 220V /HS/FR220V hot swappable power supply, for France.192-9102053orderable9175http://www.supp-102053.com/cat/hw/p2370.html
2311PS 220V /LPower supply for laptop computers, 220V192-9102053orderable9579http://www.supp-102053.com/cat/hw/p2311.html
1733PS 220V /UK220V Power supply type – United Kingdom192-9102080orderable8976http://www.supp-102080.com/cat/hw/p1733.html
2878Router – ASR/2WSpecial ALS Router – Approved Supplier required item with 2-way match193-9102063orderable345305http://www.supp-102063.com/cat/hw/p2878.html
2879Router – ASR/3WSpecial ALS Router – Approved Supplier required item with 3-way match193-9102063orderable456384http://www.supp-102063.com/cat/hw/p2879.html
2152Router – DTMF4DTMF 4 port router193-9102063obsolete231191http://www.supp-102063.com/cat/hw/p2152.html
3301Screws <B.28.P>Screws: Brass, size 28mm, Phillips head. Plastic box, contents 500.1920102071orderable1512http://www.supp-102071.com/cat/hw/p3301.html
3143Screws <B.28.S>Screws: Brass, size 28mm, straight. Plastic box, contents 500.1920102071orderable1613http://www.supp-102071.com/cat/hw/p3143.html
2323Screws <B.32.P>Screws: Brass, size 32mm, Phillips head. Plastic box, contents 400.1930102071orderable1814http://www.supp-102071.com/cat/hw/p2323.html
3134Screws <B.32.S>Screws: Brass, size 32mm, straight. Plastic box, contents 400.1930102071orderable1815http://www.supp-102071.com/cat/hw/p3134.html
3139Screws <S.16.S>Screws: Steel, size 16 mm, straight. Carton box, contents 750.1920102071orderable2117http://www.supp-102071.com/cat/hw/p3139.html
3300Screws <S.32.P>Screws: Steel, size 32mm, Phillips head. Plastic box, contents 400.1930102071orderable2319http://www.supp-102071.com/cat/hw/p3300.html
2316Screws <S.32.S>Screws: Steel, size 32mm, straight. Plastic box, contents 500.1930102074orderable2219http://www.supp-102074.com/cat/hw/p2316.html
3140Screws <Z.16.S>Screws: Zinc, length 16mm, straight. Carton box, contents 750.1920102074orderable2419http://www.supp-102074.com/cat/hw/p3140.html
2319Screws <Z.24.S>Screws: Zinc, size 24mm, straight. Carton box, contents 500.1920102074orderable2521http://www.supp-102074.com/cat/hw/p2319.html
2322Screws <Z.28.P>Screws: Zinc, size 28 mm, Phillips head. Carton box, contents 850.1920102076orderable2318http://www.supp-102076.com/cat/hw/p2322.html
3178Spreadsheet – SSP/V 2.0SmartSpread Spreadsheet, Professional Edition Version 2.0, for Vision Release 11.1 and 11.2. Shrink wrap includes CD-ROM containing advanced software and online documentation, plus printed manual, tutorial, and license registration.212-1103080orderable4537http://www.supp-103080.com/cat/sw/p3178.html
3179Spreadsheet – SSS/S 2.1SmartSpread Spreadsheet, Standard Edition Version 2.1, for SPNIX Release 4.0. Shrink wrap includes CD-ROM containing software and online documentation, plus printed manual and license registration.212-1103080orderable5044http://www.supp-103080.com/cat/sw/p3179.html
3182Word Processing – SWP/V 4.5SmartWord Word Processor, Professional Edition Version 4.5, for Vision Release 11.x. Shrink wrap includes CD-ROM, containing advanced software, printed manual, and license registration.222-3103093orderable6554http://www.supp-103093.com/cat/sw/p3182.html
3183Word Processing – SWS/V 4.5SmartWord Word Processor, Standard Edition Version 4.5, for Vision Release 11.x. Shrink wrap includes CD-ROM and license registration.222-1103093orderable5040http://www.supp-103093.com/cat/sw/p3183.html
3197Spreadsheet – SSS/V 2.1SmartSpread Spreadsheet, Standard Edition Version 2.1, for Vision Release 11.1 and 11.2. Shrink wrap includes CD-ROM containing software and online documentation, plus printed manual, tutorial, and license registration.212-1103080orderable4536http://www.supp-103080.com/cat/sw/p3197.html
3255Spreadsheet – SSS/CD 2.2BSmartSpread Spreadsheet, Standard Edition, Beta Version 2.2, for SPNIX Release 4.1. CD-ROM only.211-1103080orderable3530http://www.supp-103080.com/cat/sw/p3255.html
3256Spreadsheet – SSS/V 2.0SmartSpread Spreadsheet, Standard Edition Version 2.0, for Vision Release 11.0. Shrink wrap includes CD-ROM containing software and online documentation, plus printed manual, tutorial, and license registration.212-1103080orderable4034http://www.supp-103080.com/cat/sw/p3256.html
3260Word Processing – SWP/S 4.4SmartSpread Spreadsheet, Standard Edition Version 2.2, for SPNIX Release 4.x. Shrink wrap includes CD-ROM, containing software, plus printed manual and license registration.222-1103093orderable5041http://www.supp-103093.com/cat/sw/p3260.html
3262Spreadsheet – SSS/S 2.2SmartSpread Spreadsheet, Standard Edition Version 2.2, for SPNIX Release 4.1. Shrink wrap includes CD-ROM containing software and online documentation, plus printed manual and license registration.212-1103080under development5041http://www.supp-103080.com/cat/sw/p3262.html
3361Spreadsheet – SSP/S 1.5SmartSpread Spreadsheet, Standard Edition Version 1.5, for SPNIX Release 3.3. Shrink wrap includes CD-ROM containing advanced software and online documentation, plus printed manual, tutorial, and license registration.212-1103080orderable4034http://www.supp-103080.com/cat/sw/p3361.html
1799SPNIX3.3 – SLOperating System Software: SPNIX V3.3 – Base Server License. Includes 10 general licenses for system administration, developers, or users. No network user licensing. 2411103092orderable1000874http://www.supp-103092.com/cat/sw/p1799.html
1801SPNIX3.3 – ALOperating System Software: SPNIX V3.3 – Additional system administrator license, including network access.2411103092orderable10088http://www.supp-103092.com/cat/sw/p1801.html
1803SPNIX3.3 – DLOperating System Software: SPNIX V3.3 – Additional developer license.2411103092orderable6051http://www.supp-103092.com/cat/sw/p1803.html
1804SPNIX3.3 – UL/NOperating System Software: SPNIX V3.3 – Additional user license with network access.2411103092orderable6556http://www.supp-103092.com/cat/sw/p1804.html
1805SPNIX3.3 – UL/AOperating System Software: SPNIX V3.3 – Additional user license class A.2411103092orderable5042http://www.supp-103092.com/cat/sw/p1805.html
1806SPNIX3.3 – UL/COperating System Software: SPNIX V3.3 – Additional user license class C.2411103092orderable5042http://www.supp-103092.com/cat/sw/p1806.html
1808SPNIX3.3 – UL/DOperating System Software: SPNIX V3.3 – Additional user license class D.2411103092orderable5546http://www.supp-103092.com/cat/sw/p1808.html
1820SPNIX3.3 – NLOperating System Software: SPNIX V3.3 – Additional network access license.2411103092orderable5545http://www.supp-103092.com/cat/sw/p1820.html
1822SPNIX4.0 – SLOperating System Software: SPNIX V4.0 – Base Server License. Includes 10 general licenses for system administration, developers, or users. No network user licensing. 2411103092orderable15001303http://www.supp-103092.com/cat/sw/p1822.html
2422SPNIX4.0 – SALOperating System Software: SPNIX V4.0 – Additional system administrator license, including network access.2411103092orderable150130http://www.supp-103092.com/cat/sw/p2422.html
2452SPNIX4.0 – DLOperating System Software: SPNIX V4.0 – Additional developer license.2411103092orderable10088http://www.supp-103092.com/cat/sw/p2452.html
2462SPNIX4.0 – UL/NOperating System Software: SPNIX V4.0 – Additional user license with network access.2411103092orderable8071http://www.supp-103092.com/cat/sw/p2462.html
2464SPNIX4.0 – UL/AOperating System Software: SPNIX V4.0 – Additional user license class A.2411103092orderable7062http://www.supp-103092.com/cat/sw/p2464.html
2467SPNIX4.0 – UL/DOperating System Software: SPNIX V4.0 – Additional user license class D.2411103092orderable8064http://www.supp-103092.com/cat/sw/p2467.html
2468SPNIX4.0 – UL/COperating System Software: SPNIX V4.0 – Additional user license class C.2411103092orderable7567http://www.supp-103092.com/cat/sw/p2468.html
2470SPNIX4.0 – NLOperating System Software: SPNIX V4.0 – Additional network access license.2411103092orderable8070http://www.supp-103092.com/cat/sw/p2470.html
2471SPNIX3.3 SUOperating System Software: SPNIX V3.3 – Base Server License Upgrade to V4.0.2411103092orderable500439http://www.supp-103092.com/cat/sw/p2471.html
2492SPNIX3.3 AUOperating System Software: SPNIX V3.3 – V4.0 upgrade; class A user.2411103092orderable4538http://www.supp-103092.com/cat/sw/p2492.html
2493SPNIX3.3 C/DUOperating System Software: SPNIX V3.3 – V4.0 upgrade; class C or D user.2411103092orderable2522http://www.supp-103092.com/cat/sw/p2493.html
2494SPNIX3.3 NUOperating System Software: SPNIX V3.3 – V4.0 upgrade; network access license.2411103092orderable2520http://www.supp-103092.com/cat/sw/p2494.html
2995SPNIX3.3 SAUOperating System Software: SPNIX V3.3 – V4.0 upgrade; system administrator license.2411103092orderable7062http://www.supp-103092.com/cat/sw/p2995.html
3290SPNIX3.3 DUOperating System Software: SPNIX V3.3 – V4.0 upgrade; developer license.2411103092orderable6555http://www.supp-103092.com/cat/sw/p3290.html
1778C for SPNIX3.3 – 1 SeatC programming software for SPNIX V3.3 – single user251-6103092orderable6252http://www.supp-103092.com/cat/sw/p1778.html
1779C for SPNIX3.3 – DocC programming language documentation, SPNIX V3.325210103092orderable128112http://www.supp-103092.com/cat/sw/p1779.html
1780C for SPNIX3.3 – SysC programming software for SPNIX V3.3 – system compiler, libraries, linker251-6103092orderable450385http://www.supp-103092.com/cat/sw/p1780.html
2371C for SPNIX4.0 – DocC programming language documentation, SPNIX V4.025210103092orderable146119http://www.supp-103092.com/cat/sw/p2371.html
2423C for SPNIX4.0 – 1 SeatC programming software for SPNIX V4.0 – single user251-6103092orderable8473http://www.supp-103092.com/cat/sw/p2423.html
3501C for SPNIX4.0 – SysC programming software for SPNIX V4.0 – system compiler, libraries, linker251-6103092orderable555448http://www.supp-103092.com/cat/sw/p3501.html
3502C for SPNIX3.3 -Sys/UC programming software for SPNIX V3.3 – 4.0 Upgrade; system compiler, libraries, linker251-6103092orderable10588http://www.supp-103092.com/cat/sw/p3502.html
3503C for SPNIX3.3 – Seat/UC programming software for SPNIX V3.3 – 4.0 Upgrade – single user251-6103092orderable2218http://www.supp-103092.com/cat/sw/p3503.html
1774Base ISO CP – BLBase ISO Communication Package – Base License2910103088orderable11093http://www.supp-103088.com/cat/sw/p1774.html
1775Client ISO CP – SISO Communication Package add-on license for additional SPNIX V3.3 client.2910103087orderable2722http://www.supp-103087.com/cat/sw/p1775.html
1794OSI 8-16/ILOSI Layer 8 to 16 – Incremental License2910103096orderable128112http://www.supp-103096.com/cat/sw/p1794.html
1825X25 – 1 Line LicenseX25 network access control system, single user291-6103093orderable2521http://www.supp-103093.com/cat/sw/p1825.html
2004IC Browser – SIC Web Browser for SPNIX. Browser with network mail capability.291-1103086orderable9080http://www.supp-103086.com/cat/sw/p2004.html
2005IC Browser Doc – SDocumentation set for IC Web Browser for SPNIX. Includes Installation Manual, Mail Server Administration Guide, and User Quick Reference.2920103086orderable115100http://www.supp-103086.com/cat/sw/p2005.html
2416Client ISO CP – SISO Communication Package add-on license for additional SPNIX V4.0 client.2910103088orderable4136http://www.supp-103088.com/cat/sw/p2416.html
2417Client ISO CP – VISO Communication Package add-on license for additional Vision client.2910103088orderable3327http://www.supp-103088.com/cat/sw/p2417.html
2449OSI 1-4/ILOSI Layer 1 to 4 – Incremental License2910103088orderable8372http://www.supp-103088.com/cat/sw/p2449.html
3101IC Browser – VIC Web Browser for Vision with manual. Browser with network mail capability.292-1103086orderable7567http://www.supp-103086.com/cat/sw/p3101.html
3170Smart Suite – V/SPOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for Vision. Spanish language software and user manuals.292-6103089orderable161132http://www.supp-103089.com/cat/sw/p3170.html
3171Smart Suite – S3.3/ENOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for SPNIX Version 3.3. English language software and user manuals.292-6103089orderable148120http://www.supp-103089.com/cat/sw/p3171.html
3172Graphics – DIK+Software Kit Graphics: Draw-It Kwik-Plus. Includes extensive clip art files and advanced drawing tools for 3-D object manipulation, variable shading, and extended character fonts.291-1103094orderable4234http://www.supp-103094.com/cat/sw/p3172.html
3173Graphics – SASoftware Kit Graphics: SmartArt. Professional graphics package for SPNIX with multiple line styles, textures, built-in shapes and common symbols.291-1103094orderable8672http://www.supp-103094.com/cat/sw/p3173.html
3175Project Management – S4.0Project Management Software, for SPNIX V4.0. Software includes command line and graphical interface with text, graphic, spreadsheet, and customizable report formats.291-1103089orderable3732http://www.supp-103089.com/cat/sw/p3175.html
3176Smart Suite – V/ENOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for Vision. English language software and user manuals.292-6103089orderable120103http://www.supp-103089.com/cat/sw/p3176.html
3177Smart Suite – V/FROffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for Vision. French language software and user manuals.292-6103089orderable120102http://www.supp-103089.com/cat/sw/p3177.html
3245Smart Suite – S4.0/FROffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for SPNIX V4.0. French language software and user manuals.292-6103089orderable222195http://www.supp-103089.com/cat/sw/p3245.html
3246Smart Suite – S4.0/SPOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for SPNIX V4.0. Spanish language software and user manuals.292-6103089orderable222193http://www.supp-103089.com/cat/sw/p3246.html
3247Smart Suite – V/DEOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for Vision. German language software and user manuals.292-6103089orderable12096http://www.supp-103089.com/cat/sw/p3247.html
3248Smart Suite – S4.0/DEOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for SPNIX V4.0. German language software and user manuals.292-6103089orderable222193http://www.supp-103089.com/cat/sw/p3248.html
3250Graphics – DIKSoftware Kit Graphics: Draw-It Kwik. Simple graphics package for Vision systems, with options to save in GIF, JPG, and BMP formats.291-1103083orderable2824http://www.supp-103083.com/cat/sw/p3250.html
3251Project Management – VProject Management Software, for Vision. Software includes command line and graphical interface with text, graphic, spreadsheet, and customizable report formats.291-1103093orderable3126http://www.supp-103093.com/cat/sw/p3251.html
3252Project Management – S3.3Project Management Software, for SPNIX V3.3. Software includes command line and graphical interface with text, graphic, spreadsheet, and customizable report formats.291-1103093orderable2623http://www.supp-103093.com/cat/sw/p3252.html
3253Smart Suite – S4.0/ENOffice Suite (SmartWrite, SmartArt, SmartSpread, SmartBrowse) for SPNIX V4.0. English language software and user manuals.292-6103089orderable222188http://www.supp-103089.com/cat/sw/p3253.html
3257Web Browser – SB/S 2.1Software Kit Web Browser: SmartBrowse V2.1 for SPNIX V3.3. Includes context sensitive help files and online documentation.291-1103082orderable6658http://www.supp-103082.com/cat/sw/p3257.html
3258Web Browser – SB/V 1.0Software Kit Web Browser: SmartBrowse V2.1 for Vision. Includes context sensitive help files and online documentation.291-1103082orderable8070http://www.supp-103082.com/cat/sw/p3258.html
3362Web Browser – SB/S 4.0Software Kit Web Browser: SmartBrowse V4.0 for SPNIX V4.0. Includes context sensitive help files and online documentation.291-1103082orderable9981http://www.supp-103082.com/cat/sw/p3362.html
2231Desk – S/VStandard-sized desk; capitalizable, taxable item. Final finish is from veneer in stock at time of order, including oak, ash, cherry, and mahogany.31515103082orderable25102114http://www.supp-103082.com/cat/off/p2231.html
2335Mobile phoneDual band mobile phone with low battery consumption. Lightweight, foldable, with socket for single earphone and spare battery compartment.311-5103088orderable10083http://www.supp-103088.com/cat/off/p2335.html
2350Desk – W/48Desk – 48 inch white laminate without return; capitalizable, taxable item.31520103082orderable25002129http://www.supp-103082.com/cat/off/p2350.html
2351Desk – W/48/RDesk – 60 inch white laminate with 48 inch return; capitalizable, taxable item.31520103082orderable29002386http://www.supp-103082.com/cat/off/p2351.html
2779Desk – OS/O/FExecutive-style oversized oak desk with file drawers. Final finish is customizable when ordered, light or dark oak stain, or natural hand rubbed clear.31525103082orderable39803347http://www.supp-103082.com/cat/off/p2779.html
3337Mobile Web PhoneMobile phone including monthly fee for Web access. Slimline shape with leather-look carrying case and belt clip.312-5103088orderable800666http://www.supp-103088.com/cat/off/p3337.html
2091Paper Tablet LW 8 1/2 x 11Paper tablet, lined, white, size 8 1/2 x 11 inch3210103095orderable10http://www.supp-103095.com/cat/off/p2091.html
2093Pens – 10/FPPermanent ink pen dries quickly and is smear resistant. Provides smooth, skip-free writing. Fine point. Single color boxes (black, blue, red) or assorted box (6 black, 3 blue, and 1 red).3210103090orderable87http://www.supp-103090.com/cat/off/p2093.html
2144Card Organizer CoverReplacement cover for desk top style business card holder. Smoke grey (original color) or clear plastic.321-1103094orderable1814http://www.supp-103094.com/cat/off/p2144.html
2336Business Cards Box – 250Business cards box, capacity 250. Use form BC110-2, Rev. 3/2000 (hardcopy or online) when ordering and complete all fields marked with an asterisk.3210103091orderable5549http://www.supp-103091.com/cat/off/p2336.html
2337Business Cards – 1000/2LBusiness cards box, capacity 1000, 2-sided with different language on each side. Use form BC111-2, Rev. 12/1999 (hardcopy or online) when ordering – complete all fields marked with an asterisk and check box for second language (English is always on side 1).3210103091orderable300246http://www.supp-103091.com/cat/off/p2337.html
2339Paper – Std Printer20 lb. 8.5×11 inch white laser printer paper (recycled), ten 500-sheet reams3230103095orderable2521http://www.supp-103095.com/cat/off/p2339.html
2536Business Cards – 250/2LBusiness cards box, capacity 250, 2-sided with different language on each side. Use form BC111-2, Rev. 12/1999 (hardcopy or online) when ordering – complete all fields marked with an asterisk and check box for second language (English is always on side 1).3210103091orderable8068http://www.supp-103091.com/cat/off/p2536.html
2537Business Cards Box – 1000Business cards box, capacity 1000. Use form BC110-3, Rev. 3/2000 (hardcopy or online) when ordering and complete all fields marked with an asterisk.3210103091orderable200176http://www.supp-103091.com/cat/off/p2537.html
2783Clips – PaperWorld brand paper clips set the standard for quality.10 boxes with 100 clips each. #1 regular or jumbo, smooth or non-skid.3220103080orderable108http://www.supp-103080.com/cat/off/p2783.html
2808Paper Tablet LY 8 1/2 x 11Paper Tablet, Lined, Yellow, size 8 1/2 x 11 inch3210103098orderable10http://www.supp-103098.com/cat/off/p2808.html
oe.orders
For each order placed by a customer, various attributes are captured. There is one row per order.
order_idorder_dateorder_modecustomer_idorder_statusorder_totalsales_rep_idpromotion_id
245816-AUG-07 03.34.12.234359 PMdirect101078279.6153
239719-NOV-07 02.41.54.696211 PMdirect102142283.2154
245402-OCT-07 05.49.34.678340 PMdirect10316653.4154
235414-JUL-08 06.18.23.234567 PMdirect104046257155
235808-JAN-08 05.03.12.654278 PMdirect10527826155
238114-MAY-08 08.59.08.843679 PMdirect106323034.6156
244031-AUG-07 09.53.06.008765 PMdirect107370576.9156
235708-JAN-06 08.19.44.123456 PMdirect108559872.4158
239410-FEB-08 09.22.35.564789 PMdirect109521863158
243502-SEP-07 11.22.53.134567 PMdirect144662303159
245520-SEP-07 11.34.11.456789 AMdirect145714087.5160
237916-MAY-07 02.22.24.234567 AMdirect146817848.2161
239602-FEB-06 01.34.56.345678 AMdirect147834930161
240629-JUN-07 04.41.20.098765 AMdirect14882854.2161
243413-SEP-07 05.49.30.647893 AMdirect1498268651.8161
243602-SEP-07 06.18.04.378034 AMdirect11686394.8161
244627-JUL-07 07.03.08.302945 AMdirect1178103679.3161
244727-JUL-08 08.59.10.223344 AMdirect101833893.6161
243214-SEP-07 09.53.40.223345 AMdirect1021010523163
243313-SEP-07 10.19.00.654279 AMdirect1031078163
235526-JAN-06 09.22.51.962632 AMonline104894513.5
235626-JAN-08 09.22.41.934562 AMonline105529473.8
235908-JAN-06 09.34.13.112233 PMonline10695543.1
236014-NOV-07 12.22.31.223344 PMonline1074990.4
236113-NOV-07 01.34.21.986210 PMonline1088120131.3
236213-NOV-07 02.41.10.619477 PMonline109492829.4
236323-OCT-07 05.49.56.346122 PMonline144010082.3
236428-AUG-07 06.18.45.942399 PMonline14549500
236528-AUG-07 07.03.34.003399 PMonline146927455.3
236628-AUG-07 08.59.23.144778 PMonline147537319.4
236727-JUN-08 09.53.32.335522 PMonline14810144054.8
236826-JUN-08 10.19.43.190089 PMonline1491060065
236926-JUN-07 11.22.54.009932 PMonline116011097.4
237027-JUN-08 12.22.11.647398 AMonline1174126
237116-MAY-07 01.34.56.113356 AMonline118679405.6
237227-FEB-07 12.22.33.356789 AMonline119916447.2
237327-FEB-08 01.34.51.220065 AMonline1204416
237427-FEB-08 02.41.45.109654 AMonline12104797
237526-FEB-07 03.49.50.459233 AMonline1222103834.4
237607-JUN-07 06.18.08.883310 AMonline123611006.2
237707-JUN-07 07.03.01.001100 AMonline141538017.8
237824-MAY-07 08.59.10.010101 AMonline142525691.3
238016-MAY-07 09.53.02.909090 AMonline143327132.6
238214-MAY-08 10.19.03.828321 AMonline144871173
238312-MAY-08 11.22.30.545103 AMonline145836374.7
238412-MAY-08 12.22.34.525972 PMonline146329249.1
238508-DEC-07 11.34.11.331392 AMonline1474295892
238606-DEC-07 12.22.34.225609 PMonline1481021116.9
238711-MAR-07 03.34.56.536966 PMonline149552758.9
238804-JUN-07 04.41.12.554435 PMonline1504282694.3
238904-JUN-08 05.49.43.546954 PMonline151417620
239018-NOV-07 04.18.50.546851 PMonline15297616.8
239127-FEB-06 05.03.03.828330 PMdirect153248070.6156
239221-JUL-07 08.59.57.571057 PMdirect154926632161
239310-FEB-08 07.53.19.528202 PMdirect155423431.9161
239502-FEB-06 08.19.11.227550 PMdirect156368501163
239819-NOV-07 09.22.53.224175 PMdirect15797110.3163
239919-NOV-07 10.22.38.340990 PMdirect158025270.3161
240010-JUL-07 01.34.29.559387 AMdirect159269286.4161
240110-JUL-07 02.22.53.554822 AMdirect1603969.2163
240202-JUL-07 03.34.44.665170 AMdirect1618600154
240301-JUL-07 04.49.13.615512 PMdirect1620220154
240401-JUL-07 04.49.13.664085 PMdirect1636510158
240501-JUL-07 04.49.13.678123 PMdirect16451233159
240729-JUN-07 07.03.21.526005 AMdirect16592519155
240829-JUN-07 08.59.31.333617 AMdirect1661309158
240929-JUN-07 09.53.41.984501 AMdirect167248154
241024-MAY-08 10.19.51.985501 AMdirect168645175156
241124-MAY-07 11.22.10.548639 AMdirect169815760.5156
241229-MAR-06 10.22.09.509801 AMdirect170966816158
241329-MAR-08 01.34.04.525934 PMdirect101548552161
241429-MAR-07 02.22.40.536996 PMdirect102810794.6153
241529-MAR-06 01.34.50.545196 PMdirect1036310161
241629-MAR-07 04.41.20.945676 PMdirect1046384160
241720-MAR-07 05.49.10.974352 PMdirect10551926.6163
241820-MAR-04 04.18.21.862632 PMdirect10645546.6163
241920-MAR-07 07.03.32.764632 PMdirect107331574160
242013-MAR-07 08.59.43.666320 PMdirect108229750160
242112-MAR-07 09.53.54.562432 PMdirect109172836
242216-DEC-07 08.19.55.462332 PMdirect144211188.5153
242321-NOV-07 10.22.33.362632 AMdirect145310367.7160
242421-NOV-07 10.22.33.263332 AMdirect146413824153
242516-NOV-06 11.34.22.162552 PMdirect14751500.8163
242617-NOV-06 12.22.11.262552 AMdirect14867200
242710-NOV-07 01.34.22.362124 AMdirect14979055163
242810-NOV-07 02.41.34.463567 AMdirect116814685.8
242910-NOV-07 03.49.25.526321 AMdirect117950125154
243002-OCT-07 06.18.36.663332 AMdirect101829669.9159
243114-SEP-06 07.03.04.763452 AMdirect10215610.6163
243701-SEP-06 08.59.15.826132 AMdirect103413550163
243801-SEP-07 09.53.26.934626 AMdirect10405451154
243931-AUG-07 10.19.37.811132 AMdirect105122150.1159
244101-AUG-08 11.22.48.734526 AMdirect10652075.2160
244227-JUL-06 12.22.59.662632 PMdirect107952471.9154
244327-JUL-06 01.34.16.562632 PMdirect10803646154
244427-JUL-07 02.22.27.462632 PMdirect109177727.2155
244527-JUL-06 03.34.38.362632 PMdirect14485537.8158
244818-JUN-07 04.41.49.262632 PMdirect14551388158
244913-JUN-07 05.49.07.162632 PMdirect146686155
245011-APR-07 06.18.10.362632 PMdirect14731636159
245117-DEC-07 05.03.52.562632 PMdirect148710474.6154
245206-OCT-07 08.59.43.462632 PMdirect149512589159
245304-OCT-07 09.53.34.362632 PMdirect1160129153
245607-NOV-06 07.53.25.989889 PMdirect11703878.4163
245731-OCT-07 11.22.16.162632 PMdirect118521586.2159

Comparison Operators
Based on my experiences in teaching SQL fundamentals, comparison operators are the most easily understood by those beginning to learn SQL. This is likely because most of us will have seen and used these operators in mathematics and spreadsheet software (e.g., Microsoft Excel). Below is a table of comparison operators and their plain English translation.

OperatorMeaning
=Equal to
!=Not equal to
>Greater than
<Less than
>=Greater than or equal to
<Less than or equal to

Let’s put an operator to work by filtering to those products in the product information table with a category ID value of 12. For this example, we’ll retrieve the product ID, product name, and category ID attributes. See the code and corresponding output below.

SELECT
	oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.category_id
FROM
	oe.product_information
WHERE
    oe.product_information.category_id = 12;
product_idproduct_namecategory_id
1797Inkjet C/8/HQ12
2459LaserPro 1200/8/BW12
3127LaserPro 600/6/BW12
1782Compact 400/DQ12
2430Compact 400/LQ12
1792Industrial 600/DQ12
1791Industrial 700/HD12
2302Inkjet B/612
2453Inkjet C/412

In the output above, only those products (9) with a product category of 12 are included. Why? Let’s break the example code down to acquire a better understanding.

In the example code, the operand on the left side of the comparison operator is the category ID attribute. On the right side of the comparison operator is the integer value, 12. Each row’s category ID value is compared to that value. Where the category ID is equal to 12 the condition evaluates to TRUE and the row is included in the output. For those rows where the category ID is not equal to 12 or is unknown, the condition evaluates to FALSE and is not included in the output. If requirements change, say, the interest is now in those products with a category value not equal to twelve, then the equals comparison operator can simply be swapped for the not equal to comparison operator (i.e., !=).

Let’s look at another example, but one where the comparison being made involves an attribute of character or string data type instead of numeric. Suppose there is a need to retrieve the order ID, order date, and order total for all orders made online. Using the orders table, the attribute “order_mode” can be used to apply this filter. See the example code and corresponding output below.

SELECT
	oe.orders.order_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
	oe.orders.order_mode = 'online';
order_idorder_dateorder_total
235526-JAN-06 09.22.51.962632 AM94513.5
235626-JAN-08 09.22.41.934562 AM29473.8
235908-JAN-06 09.34.13.112233 PM5543.1
236014-NOV-07 12.22.31.223344 PM990.4
236113-NOV-07 01.34.21.986210 PM120131.3
236213-NOV-07 02.41.10.619477 PM92829.4
236323-OCT-07 05.49.56.346122 PM10082.3
236428-AUG-07 06.18.45.942399 PM9500
236528-AUG-07 07.03.34.003399 PM27455.3
236628-AUG-07 08.59.23.144778 PM37319.4
236727-JUN-08 09.53.32.335522 PM144054.8
236826-JUN-08 10.19.43.190089 PM60065
236926-JUN-07 11.22.54.009932 PM11097.4
237027-JUN-08 12.22.11.647398 AM126
237116-MAY-07 01.34.56.113356 AM79405.6
237227-FEB-07 12.22.33.356789 AM16447.2
237327-FEB-08 01.34.51.220065 AM416
237427-FEB-08 02.41.45.109654 AM4797
237526-FEB-07 03.49.50.459233 AM103834.4
237607-JUN-07 06.18.08.883310 AM11006.2
237707-JUN-07 07.03.01.001100 AM38017.8
237824-MAY-07 08.59.10.010101 AM25691.3
238016-MAY-07 09.53.02.909090 AM27132.6
238214-MAY-08 10.19.03.828321 AM71173
238312-MAY-08 11.22.30.545103 AM36374.7
238412-MAY-08 12.22.34.525972 PM29249.1
238508-DEC-07 11.34.11.331392 AM295892
238606-DEC-07 12.22.34.225609 PM21116.9
238711-MAR-07 03.34.56.536966 PM52758.9
238804-JUN-07 04.41.12.554435 PM282694.3
238904-JUN-08 05.49.43.546954 PM17620
239018-NOV-07 04.18.50.546851 PM7616.8

In the output above, only those orders (32) with an order mode value of “online” are included. Notice, I’ve intentionally not included the order mode attribute in the output. I did this for two reasons. One, to showcase attributes used in the WHERE clause are not required to also be included in the SELECT clause. And two, in most cases, there is no benefit to be had by including the attribute as the value will read the same for all rows. Minimize the amount of data returned by your queries when and where it makes sense to.

In the example above, the operand on the right-hand side of the comparison operator was a sequence of characters. Conditions utilizing a sequence of characters, in this case the word “online”, require the sequence be enclosed in single quotes (i.e., ‘online’). While some relational database management systems will allow you to also use double quotes, it is important to get in the habit of using single quotes to develop portable solutions. Double quotes should be reserved for identifiers, such as columns and tables.

Logical Operators
Logical operators allow us to filter data based on more complex conditions. They allow us to chain multiple conditions together, compare row values to a set or range of specified values, negate conditions, and implement pattern-matching conditions. Below is a table of logical operators and their behavior when used to evaluate conditions. In the absence of concrete examples, how and when to use each operator can be confusing, so let’s develop a better understanding of each operator through examples.

OperatorEvaluating Conditions
INReturns true if the value being compared is equal to one of those listed.
BETWEENReturns true if the value being compared is within the range of the two values provided, endpoint inclusive.
LIKEReturns true if the value being compared matches a given pattern.
NOTReturns true when the condition is false and false when the condition is true.
ANDReturns true when conditions on both sides of the operator are true.
ORReturns true when either condition on each side of the operator are true.

IN Operator
In the previous examples, comparison operators were used to compare each row’s value for a specified attribute to a single, user-specified value. In many instances, you will need to retrieve those rows where each row’s value for a specified attribute matches one of many specified values or doesn’t match any specified values. For example, suppose instead of retrieving those rows corresponding to products with a category ID value of 12, the requirement in the first example above was slightly altered to include those products with a category ID value of 12, 19, or 31. To satisfy the updated requirement, the IN operator can be used. The IN operator allows you to test whether each row’s value is a member of the user-specified list of values. The list of values provided must be enclosed in parentheses and the values must be of uniform data type. The use of expression lists is a special exception to this rule but are not critical to understand at this point. See the code and corresponding output below capturing the products with a category ID value of 12, 19, or 31.

SELECT
    oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.category_id
FROM
    oe.product_information
WHERE
    oe.product_information.category_id IN (12, 19, 31);
product_idproduct_namecategory_id
1797Inkjet C/8/HQ12
2459LaserPro 1200/8/BW12
3127LaserPro 600/6/BW12
1782Compact 400/DQ12
2430Compact 400/LQ12
1792Industrial 600/DQ12
1791Industrial 700/HD12
2302Inkjet B/612
2453Inkjet C/412
2522Battery – EL19
2278Battery – NiHM19
2418Battery Backup (DA-130)19
2419Battery Backup (DA-290)19
3097Cable Connector – 32R19
3099Cable Harness19
2380Cable PR/15/P19
2408Cable PR/P/619
2457Cable PR/S/619
2373Cable RS232 10/AF19
1734Cable RS232 10/AM19
1737Cable SCSI 10/FW/ADS19
1745Cable SCSI 20/WD->D19
2982Drive Mount – A19
3277Drive Mount – A/T19
2976Drive Mount – D19
3204Envoy DS19
2638Envoy DS/E19
3020Envoy IC19
1948Envoy IC/5819
3003Laptop 128/12/56/v90/11019
2999Laptop 16/8/11019
3000Laptop 32/10/5619
3001Laptop 48/10/56/11019
3004Laptop 64/10/56/22019
3391PS 110/22019
3124PS 110V /T19
1738PS 110V /US19
2377PS 110V HS/US19
2299PS 12V /P19
3123PS 220V /D19
1748PS 220V /EUR19
2387PS 220V /FR19
2370PS 220V /HS/FR19
2311PS 220V /L19
1733PS 220V /UK19
2878Router – ASR/2W19
2879Router – ASR/3W19
2152Router – DTMF419
3301Screws <B.28.P>19
3143Screws <B.28.S>19
2323Screws <B.32.P>19
3134Screws <B.32.S>19
3139Screws <S.16.S>19
3300Screws <S.32.P>19
2316Screws <S.32.S>19
3140Screws <Z.16.S>19
2319Screws <Z.24.S>19
2322Screws <Z.28.P>19
2231Desk – S/V31
2335Mobile phone31
2350Desk – W/4831
2351Desk – W/48/R31
2779Desk – OS/O/F31
3337Mobile Web Phone31

For most problems solved programmatically, there exists multiple candidate solutions. The use of the IN operator in the solution above was just one method to retrieve the desired products. Another method is to use multiple OR operators to evaluate each row’s value against a series of conditions. It is less elegant and concise but works all the same. The code below will return the same output as that shown above.

SELECT
    oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.category_id
FROM
    oe.product_information
WHERE
    oe.product_information.category_id = 12
    OR oe.product_information.category_id = 19
	OR oe.product_information.category_id = 31;

NOT Operator
In the previous example, the goal was to retrieve products with a category ID value of 12, 19, or 31. The category IDs of interest were known in advance and easy to list out following the IN operator. There will be times where the values of interest are not entirely known in advance, or it is simply unreasonable and messy to enumerate them. In such cases, the NOT operator can be used in conjunction with the IN operator. See the code and corresponding output below where those products with category IDs other than 12, 19, and 31 are captured.

SELECT
    oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.category_id
FROM
    oe.product_information
WHERE
    oe.product_information.category_id NOT IN (12, 19, 31);
product_idproduct_namecategory_id
2254HD 10GB /I13
3353HD 10GB /R13
3069HD 10GB /S13
2253HD 10GB @5400 /SE13
3354HD 12GB /I13
3072HD 12GB /N13
3334HD 12GB /R13
3071HD 12GB /S13
2255HD 12GB @7200 /SE13
1743HD 18.2GB @10000 /E13
2382HD 18.2GB@10000 /I13
3399HD 18GB /SE13
3073HD 6GB /I13
1768HD 8.2GB @540013
2410HD 8.4GB @540013
2257HD 8GB /I13
3400HD 8GB /SE13
3355HD 8GB /SI13
1772HD 9.1GB @1000013
2243Monitor 17/HR/F11
3057Monitor 17/SD11
3061Monitor 19/SD11
2245Monitor 19/SD/M11
3065Monitor 21/D11
3331Monitor 21/HR11
2252Monitor 21/HR/M11
3064Monitor 21/SD11
3155Monitor Hinge – HD11
3234Monitor Hinge – STD11
3350Plasma Monitor 10/LE/VGA11
2236Plasma Monitor 10/TFT/XGA11
3054Plasma Monitor 10/XGA11
2810Inkvisible Pens32
2870Pencil – Mech32
1781CDW 20/48/E17
2264CDW 20/48/I17
2260DFD 1.44/3.517
2266DVD 12x17
3077DVD 8x17
2259FD 1.44/3.517
2261FD 1.44/3.5/E17
3082Modem – 56/90/E17
2270Modem – 56/90/I17
2268Modem – 56/H/E17
3083Modem – 56/H/I17
2374Modem – C/10017
1740TD 12GB/DAT17
2409TD 7GB/817
2262ZIP 10017
2414HD 9.1GB @10000 /I13
2415HD 9.1GB @720013
239532MB Cache /M14
175532MB Cache /NM14
240664MB Cache /M14
240464MB Cache /NM14
17708MB Cache /NM14
24128MB EDO Memory14
2378DIMM – 128 MB14
3087DIMM – 16 MB14
2384DIMM – 1GB14
1749DIMM – 256MB14
1750DIMM – 2GB14
2394DIMM – 32MB14
2400DIMM – 512 MB14
1763DIMM – 64MB14
2396EDO – 32MB14
2272RAM – 16 MB14
2274RAM – 32 MB14
3090RAM – 48 MB14
1739SDRAM – 128 MB14
3359SDRAM – 16 MB14
3088SDRAM – 32 MB14
2276SDRAM – 48 MB14
3086VRAM – 16 MB14
3091VRAM – 64 MB14
1787CPU D30015
2439CPU D40015
1788CPU D60015
2375GP 1024×76815
2411GP 1280×102415
1769GP 800×60015
2049MB – S30015
2751MB – S45015
3112MB – S50015
2752MB – S55015
2293MB – S60015
3114MB – S900/650+15
3129Sound Card STD15
3133Video Card /3215
2308Video Card /E3215
2496WSP DA-13015
2497WSP DA-29015
3106KB 101/EN16
2289KB 101/ES16
3110KB 101/FR16
3108KB E/EN16
2058Mouse +WP16
2761Mouse +WP/CL16
3117Mouse C/E16
2056Mouse Pad /CL16
2211Wrist Pad16
2944Wrist Pad /CL16
1742CD-ROM 500/16x17
2402CD-ROM 600/E/24x17
2403CD-ROM 600/I/24x17
1761CD-ROM 600/I/32x17
2381CD-ROM 8x17
2424CDW 12/2417
1726LCD Monitor 11/PM11
2359LCD Monitor 9/PM11
3060Monitor 17/HR11
3051Pens – 10/MP32
3150Card Holder – 2532
3208Pencils – Wood32
3209Sharpener – Pencil32
3224Card Organizer – 25032
3225Card Organizer – 100032
3511Paper – HQ Printer32
3515Lead Replacement32
2986Manual – Vision OS/2x +33
3163Manual – Vision Net6.3/US33
3165Manual – Vision Tools2.033
3167Manual – Vision OS/2.x33
3216Manual – Vision Net6.333
3220Manual – Vision OS/1.233
1729Chemicals – RCP39
1910FG Stock – H39
1912SS Stock – 3mm39
1940ESD Bracelet/Clip39
2030Latex Gloves39
2326Plastic Stock – Y39
2330Plastic Stock – R39
2334Resin39
2340Chemicals – SW39
2365Chemicals – TCS39
2594FG Stock – L39
2596SS Stock – 1mm39
2631ESD Bracelet/QR39
2721PC Bag – L/S39
2722PC Bag – L/D39
2725Machine Oil39
2782PC Bag – C/S39
3187Plastic Stock – B/HD39
3189Plastic Stock – G39
3191Plastic Stock – O39
3193Plastic Stock – W/HD39
3178Spreadsheet – SSP/V 2.021
3179Spreadsheet – SSS/S 2.121
3182Word Processing – SWP/V 4.522
3183Word Processing – SWS/V 4.522
3197Spreadsheet – SSS/V 2.121
3255Spreadsheet – SSS/CD 2.2B21
3256Spreadsheet – SSS/V 2.021
3260Word Processing – SWP/S 4.422
3262Spreadsheet – SSS/S 2.221
3361Spreadsheet – SSP/S 1.521
1799SPNIX3.3 – SL24
1801SPNIX3.3 – AL24
1803SPNIX3.3 – DL24
1804SPNIX3.3 – UL/N24
1805SPNIX3.3 – UL/A24
1806SPNIX3.3 – UL/C24
1808SPNIX3.3 – UL/D24
1820SPNIX3.3 – NL24
1822SPNIX4.0 – SL24
2422SPNIX4.0 – SAL24
2452SPNIX4.0 – DL24
2462SPNIX4.0 – UL/N24
2464SPNIX4.0 – UL/A24
2467SPNIX4.0 – UL/D24
2468SPNIX4.0 – UL/C24
2470SPNIX4.0 – NL24
2471SPNIX3.3 SU24
2492SPNIX3.3 AU24
2493SPNIX3.3 C/DU24
2494SPNIX3.3 NU24
2995SPNIX3.3 SAU24
3290SPNIX3.3 DU24
1778C for SPNIX3.3 – 1 Seat25
1779C for SPNIX3.3 – Doc25
1780C for SPNIX3.3 – Sys25
2371C for SPNIX4.0 – Doc25
2423C for SPNIX4.0 – 1 Seat25
3501C for SPNIX4.0 – Sys25
3502C for SPNIX3.3 -Sys/U25
3503C for SPNIX3.3 – Seat/U25
1774Base ISO CP – BL29
1775Client ISO CP – S29
1794OSI 8-16/IL29
1825X25 – 1 Line License29
2004IC Browser – S29
2005IC Browser Doc – S29
2416Client ISO CP – S29
2417Client ISO CP – V29
2449OSI 1-4/IL29
3101IC Browser – V29
3170Smart Suite – V/SP29
3171Smart Suite – S3.3/EN29
3172Graphics – DIK+29
3173Graphics – SA29
3175Project Management – S4.029
3176Smart Suite – V/EN29
3177Smart Suite – V/FR29
3245Smart Suite – S4.0/FR29
3246Smart Suite – S4.0/SP29
3247Smart Suite – V/DE29
3248Smart Suite – S4.0/DE29
3250Graphics – DIK29
3251Project Management – V29
3252Project Management – S3.329
3253Smart Suite – S4.0/EN29
3257Web Browser – SB/S 2.129
3258Web Browser – SB/V 1.029
3362Web Browser – SB/S 4.029
2091Paper Tablet LW 8 1/2 x 1132
2093Pens – 10/FP32
2144Card Organizer Cover32
2336Business Cards Box – 25032
2337Business Cards – 1000/2L32
2339Paper – Std Printer32
2536Business Cards – 250/2L32
2537Business Cards Box – 100032
2783Clips – Paper32
2808Paper Tablet LY 8 1/2 x 1132

BETWEEN Operator
The BETWEEN operator can be used to filter data based on user-specified lower-bound and upper-bound values. For example, suppose you need to generate a report containing high-level information on each of the orders placed by customers between two dates. Using the query below, all orders between August 1, 2007 and August 31, 2007, inclusive, are returned. The order ID, customer ID, order date, and order total attributes are included in the output.

SELECT
    oe.orders.order_id,
    oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.order_date BETWEEN '01-AUG-07' AND '31-AUG-07';
order_idcustomer_idorder_dateorder_total
245810116-AUG-07 03.34.12.234359 PM78279.6
236414528-AUG-07 06.18.45.942399 PM9500
236514628-AUG-07 07.03.34.003399 PM27455.3
236614728-AUG-07 08.59.23.144778 PM37319.4

As seen in the example code above, when using the BETWEEN operator, the two user-specified values must be separated by the logical operator, AND.

When exploring the IN operator, I covered how there was another way to achieve the same outcome by using multiple conditions chained together by the logical operator, OR. Similarly, the logic captured in the WHERE clause above can be captured using the combination of two compound comparison operators. The code below will return the same output as seen above.

SELECT
    oe.orders.order_id,
    oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.order_date >= '01-AUG-07'
    AND oe.orders.order_date <= '31-AUG-07';

Although the code above requires the order date attribute to be specified on each side of the AND operator and is seemingly less succinct, I find it improves readability and consciously avoids using the BETWEEN operator in production code. The reader of the code and your future self needs to recall how endpoints are treated (i.e., both endpoints are included). When comparison operators are used, the treatment of endpoints is explicitly stated through the operators themselves and can be customized to meet requirements.

LIKE Operator
When filtering on string attributes, it can sometimes be difficult to explicitly state the values of interest. In some instances, all desired values are not known in advance and in others, it is unreasonable to list them due to the number or complexity of the values. These obstacles can be overcome by using the LIKE operator.

The LIKE operator allows users to implement filters based on user-specified patterns. Patterns are specified using SQL’s pattern-matching characters. The two main pattern-matching characters and their meanings can be found in the table below.

Pattern-matching CharacterMeaning
%Matches or is a placeholder for zero or more characters.
_Matches or is a placeholder for exactly one character.

Using the pattern-matching characters above, users can implement filters based on a row’s attribute value starting with, ending with, and containing a specified sequence of characters. Let’s walk through a couple of examples to better understand the LIKE operator and supporting pattern-matching characters.

In this first example, suppose you need to generate a report containing information related to all product categories starting with the word or sequences of characters, “hardware.” In the categories table shown at the beginning of this page, there exists nine product categories with a category name starting with that sequence. We can use the LIKE operator along with this specified sequence of characters and the pattern-matching character, “%”, to implement a clear and concise filtering condition. The pattern following the LIKE operator in the code below translates to “starts with hardware followed by zero or more characters.” This pattern will match product category names such as, hardware, hardware1, hardware2, etc. If a category named hardwaresqlshortreads existed, it would match that, too! The code’s corresponding output is also provided below.

SELECT
	oe.categories_tab.category_name,
    oe.categories_tab.category_description,
    oe.categories_tab.category_id,
    oe.categories_tab.parent_category_id
FROM
	oe.categories_tab
WHERE
	oe.categories_tab.category_name LIKE 'hardware%';
category_namecategory_descriptioncategory_idparent_category_id
hardware1monitors1110
hardware2printers1210
hardware3harddisks1310
hardware4memory components/upgrades1410
hardware5processors, sound and video cards, network cards, motherboards1510
hardware6keyboards, mouses, mouse pads1610
hardware7other peripherals (CD-ROM, DVD, tape cartridge drives, …)1710
hardware8miscellaneous hardware (cables, screws, power supplies …)1910
hardwarecomputer hardware and peripherals1090

For the second example, let us focus on the idea of searching for a sequence of characters within a sequence of characters. In other words, we want to determine if a row’s value for an attribute contains a specified sequence of characters. Suppose there is a need to generate a report containing all printer products from the product information table. Further suppose the product categories table shown at the beginning of this page does not exist, so we cannot simply filter to those products in the product information table with a product category ID value of 12. Instead, we must rely on each product’s description. The code below will return all products with a description containing the word, “printer.” If you examine the corresponding output, you will notice that the solution is not perfect. Printer accessories, such as cables and paper are also included. Nonetheless, the solution provides a reasonable output with products limited to printers and their accessories.

SELECT
	oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.product_description
FROM
	oe.product_information
WHERE
    oe.product_information.product_description LIKE '%printer%';
product_idproduct_nameproduct_description
1797Inkjet C/8/HQInkjet printer, color, 8 pages per minute, high resolution (photo quality). Memory: 16MB. Dimensions (HxWxD): 7.3 x 17.5 x 14 inch. Paper size: A4, US Letter, envelopes. Interface: Centronics parallel, IEEE 1284 compliant.
2459LaserPro 1200/8/BWProfessional black and white laserprinter, resolution 1200 dpi, 8 pages per second. Dimensions (HxWxD): 22.37 x 19.86 x 21.92 inch. Software: Enhanced driver support for SPNIX v4.0; MS-DOS Built-in printer drivers: ZoomSmart scaling technology, billboard, handout, mirror, watermark, print preview, quick sets, emulate laserprinter margins.
3127LaserPro 600/6/BWStandard black and white laserprinter, resolution 600 dpi, 6 pages per second. Interface: Centronics parallel, IEEE 1284 compliant. Memory: 8MB 96KB receiver buffer. MS-DOS ToolBox utilities for SPNIX AutoCAM v.17 compatible driver.
1782Compact 400/DQ400 characters per second high-speed draft printer. Dimensions (HxWxD): 17.34 x 24.26 x 26.32 inch. Interface: RS-232 serial (9-pin), no expansion slots. Paper size: A4, US Letter.
2430Compact 400/LQ400 characters per second high-speed letter-quality printer. Dimensions (HxWxD): 12.37 x 27.96 x 23.92 inch. Interface: RS-232 serial (25-pin), 3 expansion slots. Paper size: A2, A3, A4.
1792Industrial 600/DQWide carriage color capability 600 characters per second high-speed draft printer. Dimensions (HxWxD): 22.31 x 25.73 x 20.12 inch. Paper size: 3×5 inch to 11×17 inch full bleed wide format.
1791Industrial 700/HD700 characters per second dot-matrix printer with harder body and dust protection for industrial uses. Interface: Centronics parallel, IEEE 1284 compliant. Paper size: 3×5 inch to 11×17 inch full bleed wide format. Memory: 4MB. Dimensions (HxWxD): 9.3 x 16.5 x 13 inch.
2380Cable PR/15/P15 foot parallel printer cable
2408Cable PR/P/6Standard Centronics 6ft printer cable, parallel port
2457Cable PR/S/6Standard RS232 serial printer cable, 6 feet
3511Paper – HQ PrinterQuality paper for inkjet and laser printers tested to resist printer jams. Acid free for archival purposes. 22lb. weight with brightness of 92. Size: 8 1/2 x 11. Single 500-sheet ream.
2339Paper – Std Printer20 lb. 8.5×11 inch white laser printer paper (recycled), ten 500-sheet reams

While the solution above is viable, use caution when writing queries containing filters translating to “contains.” Searching for a specific sequence of characters within values varying in length from row to row, especially the lengthy ones observed within the description attribute, can be computationally expensive. Every character within each row’s description value must be traversed to determine whether the value does or does not contain the target sequence of characters.

Having briefly explored the task of creating filters translating to starts with and contains, let us move onto an example where the target sequence is required to exist at the end of a row’s value. In other words, we want a filter that translates to, ends with. In the code below, the condition in the WHERE clause specifies to retrieve all product categories from the categories table with category names ending in the sequence of characters, “ware.” Without looking at the corresponding output, can you guess which rows will be returned by the query?

SELECT
	oe.categories_tab.category_name,
    oe.categories_tab.category_description,
    oe.categories_tab.category_id,
    oe.categories_tab.parent_category_id
FROM
	oe.categories_tab
WHERE
	oe.categories_tab.category_name LIKE '%ware';
Output (Click to show/hide).
category_namecategory_descriptioncategory_idparent_category_id
hardwarecomputer hardware and peripherals1090
softwarecomputer software2090

The two product categories with names ending in “ware” are software and hardware. Product category names, such as hardware1, hardware2, software1, and software2 were not returned by the query because the category names do not end with the exact specified sequence of characters.

In each of the three examples above, the “%” character was used to represent zero or more characters in the target pattern. We can use the “_” (underscore) character to be represent exactly one character. To showcase how this pattern-matching character can be used, suppose we are tasked with generating the same report above, but only for the child categories of the software category. The child categories of the software category are those categories with names starting with “software” followed by exactly one character (e.g., 1, 2, 3, etc.). This requirement translates to the pattern “software_”. See the code and corresponding output below.

SELECT
	oe.categories_tab.category_name,
    oe.categories_tab.category_description,
    oe.categories_tab.category_id,
    oe.categories_tab.parent_category_id
FROM
	oe.categories_tab
WHERE
	oe.categories_tab.category_name LIKE 'software_';
category_namecategory_descriptioncategory_idparent_category_id
software1spreadsheet software2120
software2word processing software2220
software3database software2320
software4operating systems2420
software5software development tools (including languages)2520
software6miscellaneous software2920

Please note, the LIKE operator was used in the example above strictly for demonstrative purposes. The task can be achieved in a more straightforward manner by relying on the contents of the parent category ID attribute. Filtering to those product categories with a parent category ID value of 20 will result in the same output.

AND & OR Operators
The AND and OR logical operators allow us to implement filters based on multiple conditions. Understanding these two operators is critical to developing queries refined to retrieve the minimal amount of data required for a specific task. Let’s start with the AND operator, continue onto the OR operator, and then build an understanding of how these two operators can be used together.

During the processing of the WHERE clause, each row is evaluated for the conditions specified. When the AND operator is used to chain conditions together a row must satisfy the condition on each side of the operator to be included in the output. The basic syntax can be seen below.

condition_1 AND condition_2

Given the syntax and the data within the orders table shown at the top of this page, suppose there is a need to generate a report containing the order ID, customer ID, order date, and order total attributes for those orders placed by the customer with an ID value of 101 and a corresponding order total value greater than or equal to $50,000. The query to generate this report along with the corresponding output can be found below. Take a moment to review both and then continue for a discussion that further examines the solution and its output.

SELECT
	oe.orders.order_id,
    oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.customer_id = 101
    AND oe.orders.order_total >= 50000;
order_idcustomer_idorder_dateorder_total
245810116-AUG-07 03.34.12.234359 PM78279.6

The output above indicates a single row within the orders table satisfied both conditions. Let’s break down how the database arrived at that output. For the sake of this explanation, assume the orders table has four attributes, order ID, customer ID, order date, and order total.

For each row in the orders table, the database used the row’s values when evaluating the conditions specified. Rows where both conditions evaluated to TRUE are kept and included in the output while the others are discarded. In the table below, I’ve added a column for each condition indicating whether the row satisfies the corresponding condition. If you were to traverse the 105 orders in this table manually, then you would arrive at the same conclusion the database did. That is, there is only one row where both conditions are satisfied. Consider giving it a try before moving onto the OR operator.

order_idcustomer_idorder_dateorder_totalcustomer_id = 101order_total >= 50,000
245810116-AUG-07 03.34.12.234359 PM78279.6TRUETRUE
239710219-NOV-07 02.41.54.696211 PM42283.2FALSEFALSE
245410302-OCT-07 05.49.34.678340 PM6653.4FALSEFALSE
235410414-JUL-08 06.18.23.234567 PM46257FALSEFALSE
235810508-JAN-08 05.03.12.654278 PM7826FALSEFALSE
238110614-MAY-08 08.59.08.843679 PM23034.6FALSEFALSE
244010731-AUG-07 09.53.06.008765 PM70576.9FALSETRUE
235710808-JAN-06 08.19.44.123456 PM59872.4FALSETRUE
239410910-FEB-08 09.22.35.564789 PM21863FALSEFALSE
243514402-SEP-07 11.22.53.134567 PM62303FALSETRUE
245514520-SEP-07 11.34.11.456789 AM14087.5FALSEFALSE
237914616-MAY-07 02.22.24.234567 AM17848.2FALSEFALSE
239614702-FEB-06 01.34.56.345678 AM34930FALSEFALSE
240614829-JUN-07 04.41.20.098765 AM2854.2FALSEFALSE
243414913-SEP-07 05.49.30.647893 AM268651.8FALSETRUE
243611602-SEP-07 06.18.04.378034 AM6394.8FALSEFALSE
244611727-JUL-07 07.03.08.302945 AM103679.3FALSETRUE
244710127-JUL-08 08.59.10.223344 AM33893.6TRUEFALSE
243210214-SEP-07 09.53.40.223345 AM10523FALSEFALSE
243310313-SEP-07 10.19.00.654279 AM78FALSEFALSE
235510426-JAN-06 09.22.51.962632 AM94513.5FALSETRUE
235610526-JAN-08 09.22.41.934562 AM29473.8FALSEFALSE
235910608-JAN-06 09.34.13.112233 PM5543.1FALSEFALSE
236010714-NOV-07 12.22.31.223344 PM990.4FALSEFALSE
236110813-NOV-07 01.34.21.986210 PM120131.3FALSETRUE
236210913-NOV-07 02.41.10.619477 PM92829.4FALSETRUE
236314423-OCT-07 05.49.56.346122 PM10082.3FALSEFALSE
236414528-AUG-07 06.18.45.942399 PM9500FALSEFALSE
236514628-AUG-07 07.03.34.003399 PM27455.3FALSEFALSE
236614728-AUG-07 08.59.23.144778 PM37319.4FALSEFALSE
236714827-JUN-08 09.53.32.335522 PM144054.8FALSETRUE
236814926-JUN-08 10.19.43.190089 PM60065FALSETRUE
236911626-JUN-07 11.22.54.009932 PM11097.4FALSEFALSE
237011727-JUN-08 12.22.11.647398 AM126FALSEFALSE
237111816-MAY-07 01.34.56.113356 AM79405.6FALSETRUE
237211927-FEB-07 12.22.33.356789 AM16447.2FALSEFALSE
237312027-FEB-08 01.34.51.220065 AM416FALSEFALSE
237412127-FEB-08 02.41.45.109654 AM4797FALSEFALSE
237512226-FEB-07 03.49.50.459233 AM103834.4FALSETRUE
237612307-JUN-07 06.18.08.883310 AM11006.2FALSEFALSE
237714107-JUN-07 07.03.01.001100 AM38017.8FALSEFALSE
237814224-MAY-07 08.59.10.010101 AM25691.3FALSEFALSE
238014316-MAY-07 09.53.02.909090 AM27132.6FALSEFALSE
238214414-MAY-08 10.19.03.828321 AM71173FALSETRUE
238314512-MAY-08 11.22.30.545103 AM36374.7FALSEFALSE
238414612-MAY-08 12.22.34.525972 PM29249.1FALSEFALSE
238514708-DEC-07 11.34.11.331392 AM295892FALSETRUE
238614806-DEC-07 12.22.34.225609 PM21116.9FALSEFALSE
238714911-MAR-07 03.34.56.536966 PM52758.9FALSETRUE
238815004-JUN-07 04.41.12.554435 PM282694.3FALSETRUE
238915104-JUN-08 05.49.43.546954 PM17620FALSEFALSE
239015218-NOV-07 04.18.50.546851 PM7616.8FALSEFALSE
239115327-FEB-06 05.03.03.828330 PM48070.6FALSEFALSE
239215421-JUL-07 08.59.57.571057 PM26632FALSEFALSE
239315510-FEB-08 07.53.19.528202 PM23431.9FALSEFALSE
239515602-FEB-06 08.19.11.227550 PM68501FALSETRUE
239815719-NOV-07 09.22.53.224175 PM7110.3FALSEFALSE
239915819-NOV-07 10.22.38.340990 PM25270.3FALSEFALSE
240015910-JUL-07 01.34.29.559387 AM69286.4FALSETRUE
240116010-JUL-07 02.22.53.554822 AM969.2FALSEFALSE
240216102-JUL-07 03.34.44.665170 AM600FALSEFALSE
240316201-JUL-07 04.49.13.615512 PM220FALSEFALSE
240416301-JUL-07 04.49.13.664085 PM510FALSEFALSE
240516401-JUL-07 04.49.13.678123 PM1233FALSEFALSE
240716529-JUN-07 07.03.21.526005 AM2519FALSEFALSE
240816629-JUN-07 08.59.31.333617 AM309FALSEFALSE
240916729-JUN-07 09.53.41.984501 AM48FALSEFALSE
241016824-MAY-08 10.19.51.985501 AM45175FALSEFALSE
241116924-MAY-07 11.22.10.548639 AM15760.5FALSEFALSE
241217029-MAR-06 10.22.09.509801 AM66816FALSETRUE
241310129-MAR-08 01.34.04.525934 PM48552TRUEFALSE
241410229-MAR-07 02.22.40.536996 PM10794.6FALSEFALSE
241510329-MAR-06 01.34.50.545196 PM310FALSEFALSE
241610429-MAR-07 04.41.20.945676 PM384FALSEFALSE
241710520-MAR-07 05.49.10.974352 PM1926.6FALSEFALSE
241810620-MAR-04 04.18.21.862632 PM5546.6FALSEFALSE
241910720-MAR-07 07.03.32.764632 PM31574FALSEFALSE
242010813-MAR-07 08.59.43.666320 PM29750FALSEFALSE
242110912-MAR-07 09.53.54.562432 PM72836FALSETRUE
242214416-DEC-07 08.19.55.462332 PM11188.5FALSEFALSE
242314521-NOV-07 10.22.33.362632 AM10367.7FALSEFALSE
242414621-NOV-07 10.22.33.263332 AM13824FALSEFALSE
242514716-NOV-06 11.34.22.162552 PM1500.8FALSEFALSE
242614817-NOV-06 12.22.11.262552 AM7200FALSEFALSE
242714910-NOV-07 01.34.22.362124 AM9055FALSEFALSE
242811610-NOV-07 02.41.34.463567 AM14685.8FALSEFALSE
242911710-NOV-07 03.49.25.526321 AM50125FALSETRUE
243010102-OCT-07 06.18.36.663332 AM29669.9TRUEFALSE
243110214-SEP-06 07.03.04.763452 AM5610.6FALSEFALSE
243710301-SEP-06 08.59.15.826132 AM13550FALSEFALSE
243810401-SEP-07 09.53.26.934626 AM5451FALSEFALSE
243910531-AUG-07 10.19.37.811132 AM22150.1FALSEFALSE
244110601-AUG-08 11.22.48.734526 AM2075.2FALSEFALSE
244210727-JUL-06 12.22.59.662632 PM52471.9FALSETRUE
244310827-JUL-06 01.34.16.562632 PM3646FALSEFALSE
244410927-JUL-07 02.22.27.462632 PM77727.2FALSETRUE
244514427-JUL-06 03.34.38.362632 PM5537.8FALSEFALSE
244814518-JUN-07 04.41.49.262632 PM1388FALSEFALSE
244914613-JUN-07 05.49.07.162632 PM86FALSEFALSE
245014711-APR-07 06.18.10.362632 PM1636FALSEFALSE
245114817-DEC-07 05.03.52.562632 PM10474.6FALSEFALSE
245214906-OCT-07 08.59.43.462632 PM12589FALSEFALSE
245311604-OCT-07 09.53.34.362632 PM129FALSEFALSE
245611707-NOV-06 07.53.25.989889 PM3878.4FALSEFALSE
245711831-OCT-07 11.22.16.162632 PM21586.2FALSEFALSE

The OR operator differs from the AND operator in that it is not all or nothing. If either condition separated by the OR operator evaluates to TRUE, then the row is included in the output. Using the same example above but with the OR operator instead of the AND operator, can you guess what the output might look like? For starters, it is a given that the single row returned when using the AND operator will also be returned when using the OR operator because both conditions evaluate to TRUE for the given row. In addition to that row, any row for which either condition evaluates to TRUE will also be returned. For clarity, see the code and corresponding output below. You will notice the output has expanded from a single row to twenty-seven rows. Based on our knowledge of the previous example, we can infer an additional twenty-six orders were placed by customers other than the customer with an ID value of 101 with an order total greater than or equal to $50,000.

SELECT
	oe.orders.order_id,
    oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.customer_id = 101
    OR oe.orders.order_total >= 50000;
order_idcustomer_idorder_dateorder_total
245810116-AUG-07 03.34.12.234359 PM78279.6
244010731-AUG-07 09.53.06.008765 PM70576.9
235710808-JAN-06 08.19.44.123456 PM59872.4
243514402-SEP-07 11.22.53.134567 PM62303
243414913-SEP-07 05.49.30.647893 AM268651.8
244611727-JUL-07 07.03.08.302945 AM103679.3
244710127-JUL-08 08.59.10.223344 AM33893.6
235510426-JAN-06 09.22.51.962632 AM94513.5
236110813-NOV-07 01.34.21.986210 PM120131.3
236210913-NOV-07 02.41.10.619477 PM92829.4
236714827-JUN-08 09.53.32.335522 PM144054.8
236814926-JUN-08 10.19.43.190089 PM60065
237111816-MAY-07 01.34.56.113356 AM79405.6
237512226-FEB-07 03.49.50.459233 AM103834.4
238214414-MAY-08 10.19.03.828321 AM71173
238514708-DEC-07 11.34.11.331392 AM295892
238714911-MAR-07 03.34.56.536966 PM52758.9
238815004-JUN-07 04.41.12.554435 PM282694.3
239515602-FEB-06 08.19.11.227550 PM68501
240015910-JUL-07 01.34.29.559387 AM69286.4
241217029-MAR-06 10.22.09.509801 AM66816
241310129-MAR-08 01.34.04.525934 PM48552
242110912-MAR-07 09.53.54.562432 PM72836
242911710-NOV-07 03.49.25.526321 AM50125
243010102-OCT-07 06.18.36.663332 AM29669.9
244210727-JUL-06 12.22.59.662632 PM52471.9
244410927-JUL-07 02.22.27.462632 PM77727.2

In the previous two example queries, either the AND or OR operator was used, but not both. A task may require you to incorporate filtering criteria utilizing both operators. For example, suppose you are tasked with generating a report with the same layout seen in the previous example; however, this time it needs to contain only those orders placed in the year 2006 or orders placed by the customer with an ID value of 101 with an order total value greater than or equal to $50,000. The code below fulfills the reporting requirements by using two compound conditions separated by an OR operator. The first compound condition tests whether or not the order was placed in the year 2006. The second compound condition tests whether or not the order was placed by the customer with an ID value of 101 with an order total value greater than or equal to $50,000. For each order in the output, at least one of these compound conditions evaluated to TRUE. Take a moment to review the code’s output. We’ll dive into the code’s output to better understand why each order exists in the output, next.

SELECT
    oe.orders.order_id,
    oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
    (
    	oe.orders.order_date >= '01-JAN-06'
    	AND oe.orders.order_date < '01-JAN-07'
    )
    OR (
    	oe.orders.customer_id = 101
    	AND oe.orders.order_total >= 50000
    );
order_idcustomer_idorder_dateorder_total
245810116-AUG-07 03.34.12.234359 PM78279.6
242614817-NOV-06 12.22.11.262552 AM7200
242514716-NOV-06 11.34.22.162552 PM1500.8
245611707-NOV-06 07.53.25.989889 PM3878.4
243110214-SEP-06 07.03.04.763452 AM5610.6
243710301-SEP-06 08.59.15.826132 AM13550
244514427-JUL-06 03.34.38.362632 PM5537.8
244310827-JUL-06 01.34.16.562632 PM3646
244210727-JUL-06 12.22.59.662632 PM52471.9
241510329-MAR-06 01.34.50.545196 PM310
241217029-MAR-06 10.22.09.509801 AM66816
239115327-FEB-06 05.03.03.828330 PM48070.6
239515602-FEB-06 08.19.11.227550 PM68501
239614702-FEB-06 01.34.56.345678 AM34930
235510426-JAN-06 09.22.51.962632 AM94513.5
235910608-JAN-06 09.34.13.112233 PM5543.1
235710808-JAN-06 08.19.44.123456 PM59872.4

In the output above, order ID 2458 exists because the row’s values result in the second compound condition evaluating to TRUE. The customer ID value is 101 and the order total value associated with the order is greater than $50,000. Remember, both conditions on each side of the logical operator, AND, must evaluate to TRUE for the compound condition to be TRUE. In other words, it is not enough that the customer ID value is 101 or the order total is greater than or equal to $50,000. Both things must be true. Aside from this row, all other rows exist in the output because the orders were placed in the year 2006.

Missing or Unknown Values
When working with data, it is somewhat common to encounter rows with unpopulated attributes. This is especially true for tables with definitions not requiring all attributes to be populated and/or the upstream applications where the data originates being fast and loose on data quality. Table definitions and application controls are seldom managed by those writing queries against the data. Most of the time, the best we can do is to learn methods for identifying those rows with unpopulated values. Specific tasks may require you to zero-in on those rows or exclude them. Let us walk through a couple of examples to build an understanding on how to handle both scenarios.

Let us start with retrieving those rows with unpopulated values for a specific attribute. The example task is to identify those rows within the orders table with unpopulated sales representative ID values. Rows with unpopulated sales representative ID values indicate the customer did not work with a sales representative while creating and subsequently placing the order. The code below fulfills this task by using the combination of the IS keyword and NULL. It is important to understand the use of a comparison operator and NULL (e.g., = NULL) or the IN operator would not work here. Why? NULL represents the absence of a value. It is impossible to know whether any given sales representative ID value is equal to or unequal to NULL because we do not know what NULL is. This same rule applies when performing mathematical operations in SQL. A known value, say 10, plus an unknown value is NULL. Again, the outcome of an mathematical operation can’t be determined when one of the operands is NULL. The code’s output is included, capturing the thirty-five orders with unpopulated sales representative ID values. Note that Oracle’s Live SQL platform’s external representation of NULL, or what you see visually, in the output is a the hyphen character.

SELECT
	oe.orders.order_id,
    oe.orders.customer_id,
    oe.orders.sales_rep_id,
    oe.orders.order_date,
    oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.sales_rep_id IS NULL;
order_idcustomer_idsales_rep_idorder_dateorder_total
235510426-JAN-06 09.22.51.962632 AM94513.5
235610526-JAN-08 09.22.41.934562 AM29473.8
235910608-JAN-06 09.34.13.112233 PM5543.1
236010714-NOV-07 12.22.31.223344 PM990.4
236110813-NOV-07 01.34.21.986210 PM120131.3
236210913-NOV-07 02.41.10.619477 PM92829.4
236314423-OCT-07 05.49.56.346122 PM10082.3
236414528-AUG-07 06.18.45.942399 PM9500
236514628-AUG-07 07.03.34.003399 PM27455.3
236614728-AUG-07 08.59.23.144778 PM37319.4
236714827-JUN-08 09.53.32.335522 PM144054.8
236814926-JUN-08 10.19.43.190089 PM60065
236911626-JUN-07 11.22.54.009932 PM11097.4
237011727-JUN-08 12.22.11.647398 AM126
237111816-MAY-07 01.34.56.113356 AM79405.6
237211927-FEB-07 12.22.33.356789 AM16447.2
237312027-FEB-08 01.34.51.220065 AM416
237412127-FEB-08 02.41.45.109654 AM4797
237512226-FEB-07 03.49.50.459233 AM103834.4
237612307-JUN-07 06.18.08.883310 AM11006.2
237714107-JUN-07 07.03.01.001100 AM38017.8
237814224-MAY-07 08.59.10.010101 AM25691.3
238014316-MAY-07 09.53.02.909090 AM27132.6
238214414-MAY-08 10.19.03.828321 AM71173
238314512-MAY-08 11.22.30.545103 AM36374.7
238414612-MAY-08 12.22.34.525972 PM29249.1
238514708-DEC-07 11.34.11.331392 AM295892
238614806-DEC-07 12.22.34.225609 PM21116.9
238714911-MAR-07 03.34.56.536966 PM52758.9
238815004-JUN-07 04.41.12.554435 PM282694.3
238915104-JUN-08 05.49.43.546954 PM17620
239015218-NOV-07 04.18.50.546851 PM7616.8
242110912-MAR-07 09.53.54.562432 PM72836
242614817-NOV-06 12.22.11.262552 AM7200
242811610-NOV-07 02.41.34.463567 AM14685.8

Now, let us turn to the task of excluding those rows from the output where the sales representative ID value is not populated. In other words, the goal is to retrieve those orders where a sales representative worked with the customer during the ordering process. This can be achieved by simply using the NOT operator to negate the IS keyword. For clarity, see the code and corresponding output below.

SELECT
	oe.orders.order_id,
    oe.orders.customer_id,
    oe.orders.sales_rep_id,
    oe.orders.order_date,
    oe.orders.order_total
FROM
	oe.orders
WHERE
    oe.orders.sales_rep_id IS NOT NULL;
order_idcustomer_idsales_rep_idorder_dateorder_total
245810115316-AUG-07 03.34.12.234359 PM78279.6
239710215419-NOV-07 02.41.54.696211 PM42283.2
245410315402-OCT-07 05.49.34.678340 PM6653.4
235410415514-JUL-08 06.18.23.234567 PM46257
235810515508-JAN-08 05.03.12.654278 PM7826
238110615614-MAY-08 08.59.08.843679 PM23034.6
244010715631-AUG-07 09.53.06.008765 PM70576.9
235710815808-JAN-06 08.19.44.123456 PM59872.4
239410915810-FEB-08 09.22.35.564789 PM21863
243514415902-SEP-07 11.22.53.134567 PM62303
245514516020-SEP-07 11.34.11.456789 AM14087.5
237914616116-MAY-07 02.22.24.234567 AM17848.2
239614716102-FEB-06 01.34.56.345678 AM34930
240614816129-JUN-07 04.41.20.098765 AM2854.2
243414916113-SEP-07 05.49.30.647893 AM268651.8
243611616102-SEP-07 06.18.04.378034 AM6394.8
244611716127-JUL-07 07.03.08.302945 AM103679.3
244710116127-JUL-08 08.59.10.223344 AM33893.6
243210216314-SEP-07 09.53.40.223345 AM10523
243310316313-SEP-07 10.19.00.654279 AM78
239115315627-FEB-06 05.03.03.828330 PM48070.6
239215416121-JUL-07 08.59.57.571057 PM26632
239315516110-FEB-08 07.53.19.528202 PM23431.9
239515616302-FEB-06 08.19.11.227550 PM68501
239815716319-NOV-07 09.22.53.224175 PM7110.3
239915816119-NOV-07 10.22.38.340990 PM25270.3
240015916110-JUL-07 01.34.29.559387 AM69286.4
240116016310-JUL-07 02.22.53.554822 AM969.2
240216115402-JUL-07 03.34.44.665170 AM600
240316215401-JUL-07 04.49.13.615512 PM220
240416315801-JUL-07 04.49.13.664085 PM510
240516415901-JUL-07 04.49.13.678123 PM1233
240716515529-JUN-07 07.03.21.526005 AM2519
240816615829-JUN-07 08.59.31.333617 AM309
240916715429-JUN-07 09.53.41.984501 AM48
241016815624-MAY-08 10.19.51.985501 AM45175
241116915624-MAY-07 11.22.10.548639 AM15760.5
241217015829-MAR-06 10.22.09.509801 AM66816
241310116129-MAR-08 01.34.04.525934 PM48552
241410215329-MAR-07 02.22.40.536996 PM10794.6
241510316129-MAR-06 01.34.50.545196 PM310
241610416029-MAR-07 04.41.20.945676 PM384
241710516320-MAR-07 05.49.10.974352 PM1926.6
241810616320-MAR-04 04.18.21.862632 PM5546.6
241910716020-MAR-07 07.03.32.764632 PM31574
242010816013-MAR-07 08.59.43.666320 PM29750
242214415316-DEC-07 08.19.55.462332 PM11188.5
242314516021-NOV-07 10.22.33.362632 AM10367.7
242414615321-NOV-07 10.22.33.263332 AM13824
242514716316-NOV-06 11.34.22.162552 PM1500.8
242714916310-NOV-07 01.34.22.362124 AM9055
242911715410-NOV-07 03.49.25.526321 AM50125
243010115902-OCT-07 06.18.36.663332 AM29669.9
243110216314-SEP-06 07.03.04.763452 AM5610.6
243710316301-SEP-06 08.59.15.826132 AM13550
243810415401-SEP-07 09.53.26.934626 AM5451
243910515931-AUG-07 10.19.37.811132 AM22150.1
244110616001-AUG-08 11.22.48.734526 AM2075.2
244210715427-JUL-06 12.22.59.662632 PM52471.9
244310815427-JUL-06 01.34.16.562632 PM3646
244410915527-JUL-07 02.22.27.462632 PM77727.2
244514415827-JUL-06 03.34.38.362632 PM5537.8
244814515818-JUN-07 04.41.49.262632 PM1388
244914615513-JUN-07 05.49.07.162632 PM86
245014715911-APR-07 06.18.10.362632 PM1636
245114815417-DEC-07 05.03.52.562632 PM10474.6
245214915906-OCT-07 08.59.43.462632 PM12589
245311615304-OCT-07 09.53.34.362632 PM129
245611716307-NOV-06 07.53.25.989889 PM3878.4
245711815931-OCT-07 11.22.16.162632 PM21586.2

The previous two examples highlighted the importance of using IS NULL and IS NOT NULL in the WHERE clause to test for the absence of a value. Handling NULLs is not limited to the WHERE clause. You will need to understand how to adjust the way they are treated in calculations and represented in the output. To learn more, consider reading my page dedicated to handling NULLs after acquiring a firm understanding of the BIG SIX.

Having walked through an example or two for each operator commonly used in the WHERE clause, let us move onto the use of slightly more complex operands. If you begin to struggle to grasp the concepts being covered, do not worry. At this point, it is important you understand the operators and supplemental examples previously covered. Use the examples covered throughout the next two sections to open your eyes to common problem-solving strategies used within the WHERE clause.

Derived Values
The majority of filters applied in the WHERE clause will use a pre-existing attribute on the left-hand side of an operator. Up to this point, that has been the case for all the examples we have walked through. In rare situations should you want to perform operations or apply functions to operands on the left-hand side of an operator prior to a condition being evaluated. For queries executed against tables with a large number of rows, requiring an operation or function to be applied prior to the condition being evaluated can result in longer query processing durations. It is also true that the use of a function on the left-hand side of an operator can preclude the use of an index. Indexes are an optimization feature afforded by relational database management systems to speed up data retrieval. Understanding indexes is not critical at this point in the SQL learning journey; however, I want you to imagine the difficulty in looking up a person’s phone number in a phone book with numbers not ordered in any particular way. To find the phone number of interest, we must sift through each page. Likewise, when an index is not used, the database may need to read the entire table (i.e., full table scan) to locate and retrieve the desired data, amounting to a more expensive query. A potential solution to this problem is creating a function-based index, but again, not critical at this point.

Despite the potential downsides, there are scenarios where an operation must take place, or a function be applied to the operand on the left-hand side of an operator prior to a condition being evaluated. For example, suppose the company for which you are employed has tasked you with generating a simple report containing those products still under development. For each product, the ID, name, description, and status is required. Further suppose that the data is in less than pristine condition with product statuses being generated by user-input within a free-form text field in an upstream application. As a result, the current distinct values for the attribute are the following:

under development
UNDER DEVELOPMENT
under DEVELOPMENT
planned
orderable
obsolete

Given the state of the product status column’s values, we have four options. The first three options require the table to be queried beforehand to gather the possible variations of the target value. Products with statuses containing a variation of the target value can be retrieved by first transforming each row’s product status value prior to evaluating an equality condition, using the logical operator, IN, or through a series of equality conditions chained together by ORs. The three queries below will generate the required report. The first query transforms each row’s product status value to all uppercase using the UPPER function, allowing a simple equality condition to be evaluated. The next two queries utilize methods previously covered on this page.

SELECT
	oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.product_description,
    oe.product_information.product_status
FROM
	oe.product_information
WHERE
	UPPER(oe.product_information.product_status) = 'UNDER DEVELOPMENT';

SELECT
	oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.product_description,
    oe.product_information.product_status
FROM
	oe.product_information
WHERE
	oe.product_information.product_status IN (
    	'under development',
    	'under DEVELOPMENT',
    	'UNDER DEVELOPMENT'
    );

SELECT
	oe.product_information.product_id,
    oe.product_information.product_name,
    oe.product_information.product_description,
    oe.product_information.product_status
FROM
	oe.product_information
WHERE
	oe.product_information.product_status = 'under development'
    OR oe.product_information.product_status = 'under DEVELOPMENT'
	OR oe.product_information.product_status = 'UNDER DEVELOPMENT';
product_idproduct_nameproduct_status
2459LaserPro 1200/8/BWunder development
2382HD 18.2GB@10000 /Iunder development
3399HD 18GB /SEunder development
2236Plasma Monitor 10/TFT/XGAunder development
2384DIMM – 1GBunder development
2400DIMM – 512 MBunder development
3114MB – S900/650+under development
2944Wrist Pad /CLunder development
1761CD-ROM 600/I/32xunder development
1726LCD Monitor 11/PMunder development
3262Spreadsheet – SSS/S 2.2under development

The first three options highlighted above are those you should be implementing in the short-term. A long-term option is to work with the owners of the application to change the free-form text field in the front-end to be a drop-down containing a fixed list of values. Once the drop-down list has been implemented, the database maintainer can apply an update to those rows with the unwanted variations to reflect the value, “under development.” Taking these steps would avoid the unwanted variation in values and allow us and others to generate the report above by simply using an equality condition. This requires a joint effort across multiple teams, but it beats the alternative of having to periodically update queries to capture each new variation or perform unnecessary full table scans.

Subqueries
Often, there is a need to filter the output of a query based on the output of another query, dynamically. For example, suppose we need to generate a report containing the most recent order(s) placed based on the contents of the orders table. One way to achieve this is to retrieve all rows from the orders table and then sort them by order date in descending order. As a result of doing so and assuming there are no ties in order date values, the order represented in the first row will be the most recent order. This is an inefficient strategy and its efficacy decreases as the size of the orders table increases due to the amount of time required to retrieve and subsequently sort all rows. A more efficient and less painful strategy is to use a subquery to first return the most recent date value in the orders table and subsequently use that value to filter the orders table to the order(s) with that order date value.

The code below makes use of a subquery to do just that. Observe the operand on the right-hand side of the comparison operator is a simple query returning a single value representing the most recent order date. This query enclosed within parenthesis is executed first. Each row’s order date value is then compared to that value. As a result, the order(s) returned in the output will be the most recent order(s) placed. I’ve included the output following the code.

SELECT
	oe.orders.order_id,
	oe.orders.customer_id,
	oe.orders.order_date,
	oe.orders.order_total
FROM
	oe.orders
WHERE
	oe.orders.order_date = (
        SELECT
            MAX(oe.orders.order_date)
        FROM
            oe.orders
	);
order_idcustomer_idorder_dateorder_total
244110601-AUG-08 11.22.48.734526 AM2075.2

It is difficult to overstate the usefulness of subqueries when solving complex problems. After acquiring a firm understanding of the BIG SIX, consider reading my pages dedicated to subqueries here. These pages explore the clauses for which subqueries can exist and walk through how to implement them to solve real-world problems.

Additional Reading
Not the focus of this page but likely to be important to queries you write in the future is the concept of condition precedence. I strongly recommend you refer to the vendor’s documentation for the relational database management system and version you are using to understand the order in which conditions are evaluated. A page authored by Oracle within their language reference guide for 21c can be found here.

Knowledge Check
If you’d like to confirm your understanding on the WHERE clause and other fundamental concepts, consider solving a handful of my practice problems here.