Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Left Function In Sql in SQL

Left Function In Sql in SQL

LEFT Function in SQL

The LEFT function returns the leftmost specified number of characters from a string.


Syntax:

LEFT(string, number_of_characters)
  • string: The source string.

  • number_of_characters: The number of characters to return from the left side.


Example:

SELECT LEFT('Hello World', 5) AS left_part;

Result:

left_part
Hello

Notes:

  • Useful for extracting a substring from the beginning of a string.

  • Supported in MySQL, SQL Server, and others.

  • In Oracle, similar functionality can be done with SUBSTR(string, 1, number_of_characters).


If you want, I can show examples for other string functions!

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql