• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL Script to delete the records based on length  RSS feed

 
sudha swami
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am looking for the SQL Script to delete the name whose length is less than 4 characters.

regards
sudha
 
Jan Cumps
Bartender
Posts: 2630
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mysql example (be carefull when testing!)
Regards, Jan
 
sudha swami
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using database as Oracle.
regards
sudha
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36863
481
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudha,
That SQL will work in Oracle too.
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudha,

Do you want to update the name to be null (remove it) where it is less than 4 or do you want to delete the row where the name is less than 4?
 
Jan Cumps
Bartender
Posts: 2630
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I derived from the post's title that it was a request to delete them.
Regards, Jan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!