Salesforce SOQL is not working same as SQL, Why?
- Salesforce using Multitenant Architecture – Many organization using single instance including database but each org will have their own virtual hardware.
- Salesforce using Force.com platform – It is metadata-driven architecture.
- SOQL directly integrated with Apex no need to establish the connection to the database.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilxWtX3W0xhkvN2xKDrHf70yMIYxzKQrQbj6cG4ipBTLm4Ec5s5aT4Xr4Tj_M4zZ4jAN0Z2ecLlttFoMeLJLK73YxfrbWTe5MPfFJqiOufMGUogHLrNL-1lgpV670jTkAzUQGz9qSJihg6/s1600/We+are+having+a+baby+girl%2521.jpg)
Force.com platform having the governor limits to allow the access Multitenant Architecture
Differences between SOQL and SQL
SOQL
- It supports only SELECT statements.
- we can not include all columns at a time(Does not support SELECT * (must specify fields to include).
- It supports only “relationship queries,” which are written using parent-child syntax
- It supports the dot notation syntax to traverse table relationships.
- It is governed by LIMITS(e.g., returned rows, heap, etc.)
SQL
- It Supports statements for DML, transaction control, and SELECT statements.
- It Support SELECT * (include all columns)
- It Support joins, which are written using “left,” “right,” "inner," "outer" syntax.
- It does not support dot notation syntax to traverse table relationships.
- No governer Limits.
Let us know if you have any queries.
Happy Learning!!!