Skip to content
Advertisement

UPDATE RECORD 2 FIRST LATTER IN MYSQL [closed]

How do you update the record in the first 2 letters as in the case below.

TABLE tblBuku

1

This is the condition

2

Some Code :

Advertisement

Answer

For LAST two letters:

or

For FIRST two letters:

or

Explanation

  • % is a wildcard. It indicates one of more of any character.
  • RIGHT and LEFT get the substring LEFT(field_name, number of characters to extract from the left)
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement