In my sql database I have a table like “REG_DET”, This table mainly include 3 data member. NAME,AGE,SSN. Here SSN is a string include more than 10 character. Here my problem is when i read SSN from the table i need only last 4 character that is
Eg. Rohith , 25 , 1023456457
result only include Rohith , 25 ,6457(last 4 character of SSN)
Is It possible to do it in a sql select query(at the time of selection). If anyone know pls help me
You can use
RIGHTfunction:(assuming that you’re using SQL-Server or MySQL)
Edit: Since you’re using
TEXT, you need to conver it toVARCHARfirst: