SELECT LPAD('plus2net',13,'**');
The output is here
*****plus2net
You can see we have plus2net of 8 characters long. To this we have added or Pad at left ( at starting ) so the resultant string is of total 13 chars length.
SELECT LPAD('plus2net',2,'**');
The output is here
pl
This is first two chars of our input sting only.
select rpad('plus2net',15,'*')
The output is here plus2net*******
SELECT rpad( 'plus2net', 15, 'abc' )
Output of this is plus2netabcabca
SELECT rpad( 'plus2net', 5, 'abc' )
Output will be plus2 ( Up to 5 char only )
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.