Sql delete does not work with a

I am trying to delete a row in a database, but for some reason it does not work.

SELECT * FROM <tablename> 
WHERE MAPPING_ID = '66' 
  AND FIELD_VALUE = 'Sanità' 
  AND PARENT_VALUE = 'ITA';

Result: 66 Sanità ITA

DELETE FROM <tablename> 
WHERE MAPPING_ID = '66' 
  AND FIELD_VALUE = 'Sanità' 
  AND PARENT_VALUE = 'ITA';

Result: 0 rows deleted.

I assume this is due to a. I already have it SET DEFINE OFF, but still not.

Any suggestions?

+4
source share
3 answers
DELETE FROM <tablename> 
WHERE MAPPING_ID = '66' 
  AND FIELD_VALUE = N'Sanità' 
  AND PARENT_VALUE = 'ITA';

try using this N to match nvarchar (Unicode) value

Hope this helps you.

+8
source

The request you are trying to access does not match the syntax:

DELETE FROM table
WHERE conditions;

If you want to specify a database name, use this

DELETE FROM schema.table
WHERE conditions;
0
source

:

DELETE FROM [dbo.youtablename]
WHERE MAPPING_ID = '66' 
AND FIELD_VALUE = 'Sanità'
AND PARENT_VALUE = 'ITA';

MAPPING_ID :

DELETE FROM [dbo.youtablename]
WHERE MAPPING_ID = '66' 
0

Source: https://habr.com/ru/post/1619855/


All Articles