+--------+--------------+------+--------+-------+ | GCODE | GNAME | SIZE | COLOUR | PRICE | +--------+--------------+------+--------+-------+ | 111 | TShirt | XL | Red | 1400 | | 112 | Jeans | L | Blue | 1600 | | 113 | Skirt | M | Black | 1100 | | 114 | Ladies Jacket| XL | Blue | 4000 | | 115 | Trousers | L | Brown | 1500 | | 116 | Ladies Top | L | Pink | 1200 | +--------+--------------+------+--------+-------+Write SQL commands for the following: (a) To display names of those garments that are available in ‘L’ size.
SELECT GNAME FROM GARMENT WHERE SIZE = 'L';This command retrieves the names of garments available in L size: Jeans, Trousers, and Ladies Top.
UPDATE GARMENT SET COLOUR = 'Orange' WHERE GCODE = 115;This statement changes the COLOUR of Trousers (GCODE 115) to Orange.
INSERT INTO GARMENT (GCODE, GNAME, SIZE, COLOUR, PRICE) VALUES (117, 'Kurta', 'M', 'White', 1000);This command adds a new garment record named Kurta to the table.
ALTER TABLE GARMENT DROP COLUMN COLOUR;This command removes the COLOUR column and all its associated data from the GARMENT table.
Give the output of the query: SELECT MONTH("2010-03-05");
List-I | List-II |
---|---|
(A) SUBSTR() | (II) To extract a substring from a string. |
(B) TRIM() | (IV) To remove spaces from both sides of the string. |
(C) INSTR() | (I) To find the position of a substring in a string. |
(D) LEFT() | (III) To extract characters from the left side of the string. |
Given the following table:
ENO | SALARY |
---|---|
A101 | 4000 |
B109 | NULL |
C508 | 6000 |
A305 | 2000 |
State the output of the following query:
SELECT COUNT(SALARY) FROM EMPLOYEE;
Use the given information to select the amino acid attached to the 3′ end of tRNA during the process of translation, if the coding strand of the structural gene being transcribed has the nucleotide sequence TAC.