0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SOQLでのNot Like検索

Posted at

#1 SOQLでのNot Likeの検索、よく忘れてしまうので、メモしておきます。

SOQLでNot Like検索を行うときは、下記の形式になります。

Not Column-Name Like 'テスト%'

例:

SELECT Id
  FROM Account 
 WHERE Not Name Like 'テスト%'

また複数の検索条件があるときにはさらに上記の部分を()で囲む必要があります。
なので検索条件が一つのみでも()で囲むようにしたほうが良いです。

SELECT Id
  FROM Account 
 WHERE (Not Name Like 'テスト%')
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?