SQL mid function is used to extract the text from the text field that you specify
syntax:
select Mid(empname,1,5) as empshortname from emp;
when you run the above the SQL query, SQL will extract the test form the emp table
there empname is the column.
1 indicates from where to start
and 5 indicates that how many letters it should extract
syntax:
select Mid(empname,1,5) as empshortname from emp;
when you run the above the SQL query, SQL will extract the test form the emp table
there empname is the column.
1 indicates from where to start
and 5 indicates that how many letters it should extract
No comments:
Post a Comment