从列中的一组值中删除特定值 - HQL

时间:2015-07-13 23:42:28

标签: hql

如何编写用于从列中删除特定值的HQL(列包含一组以逗号分隔的值)

Table1
    ID Name Value

    001 Rajesh 90,100,210,400
    002 Suresh 100,400,300,66
    003 Mahesh 200,500
    004 Virat 400,578,57

我尝试了以下代码,但错误。

    Session session=getSession();        
   Query query = session.createQuery("delete from Table1 where Value=:Value and Name=:Name");
    query.setParameter("Value", "100");
    query.setParameter("Name", "Rajesh");
    query.executeUpdate(); 

我想删除Name - Rajesh

中的value-100

0 个答案:

没有答案
相关问题