Aptitude (12) C (2) C++ (10) CSS (1) Data Structure (2) English (7) General (14) HTML (3) Integration (1) Itinerary and Travel Cost (1) Java (29) JQ (5) JS (5) JSP (1) Lightning (14) logical (3) Math (1) Music Notation (17) MySql (4) Network (1) Regex (1) salesforce (131) Servlet (4) SF Admin (31) SF Dev (102) SQL (4) SQL_SERVER (1) StudyPoints (2) ytChannels (2) अन्ताक्षरी (4)

Querying All Records with a SOQL Statement || ALL ROWS || queryAll()

ALL ROWS:
SOQL statements can use the ALL ROWS keywords to query all records in an organization, including deleted records and archived activities

SELECT Id from Case  FROM  ALL ROWS

You can use ALL ROWS to query records in your organization's Recycle Bin. 
You cannot use the 'ALL ROWS' keywords with the 'FOR UPDATE' keywords.

Note: This Query not run in query locator of dev console

---------------------------------------------------------------------------------------------------------


queryAll():

Use queryAll to identify the records that have been deleted because of a merge or delete. queryAll has read-only access to the field isDeleted; otherwise it is the same as query().


No comments: