• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How do I remove the first two characters of every row in this column using SQL?

Resolved: How do I remove the first two characters of every row in this column using SQL?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

How do I remove the first two characters of every row in this column?

Answer:

If you are using MSSQL You can use STUFF like this to see how it works:
SELECT STUFF('0123456789',1,2,'')
And then with an update
UPDATE YOUR_TABLE SET YOUR_COLUMN = STUFF('YOUR_COLUMN',1,2,'')
if you were using mysql there is an similar function INSERT()
There are a few different ways to do this, you can play with SUBSTRING or even regular expressions depending on your database.

If you have better answer, please add a comment about this, thank you!

sql
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Input Focus between two React Components

02/04/2023

Resolved: linq2db throws exception when filtering by nested collection

02/04/2023

Resolved: Table data is coming as empty in React

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.