Reference no: EM133055169
Question: Using the mi602_employee database that you previously installed in Module 2.2:
Open a new query window, copy and paste the following commands.
Start copy
DROP TABLE IF EXISTS demo_NULL;
CREATE TABLE demo_NULL (
INT_A int DEFAULT NULL,
CHR_B varchar(100) DEFAULT NULL,
CHR_C varchar(100) DEFAULT NULL
) ;
INSERT INTO demo_NULL VALUES
(NULL,'That','Over there'),
(1,'Box of 64 Pixels','64 RGB pixels in a decorative box'),
(2,'Sense of Humor','Especially dry. Imported from England.'),
(NULL,'No','Stay Put'),
(10,'Beauty','Inner beauty. No cosmetic surgery required!'),
(4,'Bar Code','Unused. In original packaging.'),
(0,'This','Right here!');
End Copy
Run the following commands one at a time.
Can you explain the results?
select * from demo_NULL;
select * from demo_NULL ORDER BY INT_A;
select count(*) from demo_NULL;
select count (INT_A) from demo_NULL;
Please save a copy of your answers. Your learning facilitator will review the answers with you in class and explain the behaviour of SQL when null values are encountered.