हिंदी

Using the table EMPLOYEE from CARSHOWROOM database, write SQL queries for the following: a) Display employee name and the last 2 characters of his EmpId.

Advertisements
Advertisements

प्रश्न

Using the table EMPLOYEE from CARSHOWROOM database, write SQL queries for the following:

  1. Display employee name and the last 2 characters of his EmpId.
  2. 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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Querying and SQL Functions - Intext Questions [पृष्ठ १०]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 12
अध्याय 1 Querying and SQL Functions
Intext Questions | Q 3. | पृष्ठ १०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×