Advertisements
Advertisements
प्रश्न
Using the table EMPLOYEE from CARSHOWROOM database, write SQL queries for the following:
- Display employee name and the last 2 characters of his EmpId.
- Display designation of employee and the position of character ‘e’ in designation, if present.
कोड लेखन
Advertisements
उत्तर
a)
SELECT EmpName, RIGHT(EmpId, 2) AS Last2_Characters FROM EMPLOYEE;
b)
SELECT Designation, INSTR(Designation, 'e') AS Position_of_e FROM EMPLOYEE;
SELECT Designation, CHARINDEX('e', Designation) AS Position_of_e FROM EMPLOYEE;
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
