SUBSTRING Function - How to use SUBSTRING Function in MySQL

SUBSTRING Function - How to use SUBSTRING Function in MySQL


SUBSTRING Function in MySQL is used to extract a substring from a position with specific position.

Syntax:


SUBSTRING(string,position);
SUBSTRING(string,position,length);



So in below example if we want to start from 3rd characters and returned the rest of rows we can do that. In second part of select we are specificity telling start from 4th characters but only returned 4 records from 4th position.


Select substring('My Test string',3),
substring('My Test string',4,4) from customer;


How to use SUBSTRING Function in MySQL - MySQL Tutorial

5 comments:

  1. Telangana Board Model Paper 2023 Class 3 Pdf Download with Answers for Telugu Medium, English Medium, Hindi Medium, Urdu Medium & Students for Small Answers, Long Answer, Very Long Answer Questions, and Essay Type Questions to Term1 & Term2 Exams at official website. Telangana Board Question Paper Class 3 New Exam Scheme or Question Pattern for Sammittive Assignment Exams (SA1 & SA2): Very Long Answer (VLA), Long Answer (LA), Small Answer (SA), Very Small Answer (VSA), Single Answer, Multiple Choice and etc.

    ReplyDelete
  2. I'm writing an essay about programming and coding right now, but I have no idea where to begin. The essay will be about 1500 words long, and I need to identify references to include. I discovered a write my descriptive essay https://essaysforme.com/write-my-descriptive-essay that can tell me how many references I should have. That's what I require, and I learn how to structure an essay like that.

    ReplyDelete
  3. Greetings everyone! If you're looking for a unique way to explore San Diego, I highly recommend checking out Urban Pedicabs for their amazing pedicab tours. With their experienced drivers, you'll be able to see all the sights of the city in a comfortable and eco-friendly way. Plus, they offer a variety of tour packages that are perfect for any group, whether you're a family, a couple, or a group of friends. Don't miss out on this incredible opportunity to see San Diego like never before. Check their website at https://urbanpedicabs.com/san-diego-pedicab-tours-urban-pedicabs/ for more information and to book your tour today!

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. The SUBSTRING function in MySQL is a handy tool for manipulating and extracting substrings from strings. It's great to stumble upon topics like these, especially when you're diving into database management and SQL. By the way, I noticed the mention of an AI essay typer at https://essaytyper.ai , and I'm excited to explore how technology is evolving to assist with various writing tasks. Technology truly is reshaping the way we approach different fields, from database management to writing. Thanks for sharing this, and I'm looking forward to exploring that link further!

    ReplyDelete