Home > database >  ORACLE N 'query condition resulted from the index
ORACLE N 'query condition resulted from the index

Time:01-30

Environment:
ORACLE 11.2.0.4.0
. Netcore2.2 EFCORE

SQBH field type for varchar2
Create index statement
 the CREATE INDEX SQBHINDEX2021 ON TABLE (SQBH) 

Efcore automatically generated SQL query with N index when failure
 SELECT * FROM TABLE "" WHERE" d ". "SQBH" IN (N '330281102001', N '330281102200') 


SQL query without N index when effective
 SELECT * FROM TABLE "" WHERE" d ". "SQBH" IN (' 330281102001 ', '330281102200') 



With N implicit conversion to NVARCHAR2, index failure
A manual writing SQL directly, this need not EFCORE.
Use EFCORE how to specify the SQBH field under the condition of without N
Or get indexed effective
  • Related