This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes SQL Script to delete the records based on length Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL Script to delete the records based on length" Watch "SQL Script to delete the records based on length" New topic
Author

SQL Script to delete the records based on length

sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 186
Hi,

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

regards
sudha
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2549
    
  10

mysql example (be carefull when testing!)
Regards, Jan


OCUP UML fundamental and ITIL foundation
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 186
Hi,
I am using database as Oracle.
regards
sudha
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32609
    
215

Sudha,
That SQL will work in Oracle too.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Paul Campbell
Ranch Hand

Joined: Oct 06, 2007
Posts: 338
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

Joined: Dec 20, 2006
Posts: 2549
    
  10

I derived from the post's title that it was a request to delete them.
Regards, Jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Script to delete the records based on length
 
It's not a secret anymore!