我希望在 EF Core Lambda 中等效的 SQL 查詢,如果存在于同一個表的其他列的資料中,則根據某些子字串(在本例中為DEALER )獲取額外的列作為真或假。
myTable
Id col1
1 I have substring - DEALER
2 I do not have any substring
我需要輸出為
Id, IsDealer
1, true
2, false
我嘗試了以下 SQL 查詢,
SELECT [Id] ,
CASE WHEN [col1] LIKE '
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/519420.html
標籤:C#sql实体框架拉姆达
