Difference between From and Where Clause in SQL Last Updated : 03 May, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report 1. FROM Clause: It is used to select the dataset which will be manipulated using Select, Update or Delete command.It is used in conjunction with SQL statements to manipulate dataset from source table.We can use subqueries in FROM clause to retrieve dataset from table. Syntax of FROM clause: SELECT * FROM TABLE_NAME; 2. WHERE Clause: It is used to apply any condition on selected dataset or source data.Source data can be a single table or can be a result of joining multiple tables.It returns those instances of dataset which satisfies the condition mentioned in WHERE clause.Conditions can be applied using various comparison or logical operators like - AND, OR, IN, NOT IN, BETWEEN, equals to, not equals to etc. Syntax of WHERE clause: SELECT * FROM TABLE_NAME WHERE (CONDITIONS); Example: Consider a table name STUDENT S_NO. s_NAME S_AGE S_SECTION 1 Yash 20 A 2 Vishwash 21 A 3 Vishesh 19 B 4 Shivam 23 A 5 Vasu 21 B 6 Shrey 20 C Problem: We have to select those instances of table STUDENT where age is less than 22 and section is A. Query: SELECT * FROM STUDENT WHERE S_AGE<22 AND S_SECTION='A'; OUTPUT: Here FROM clause chooses the table on which the WHERE clause should be applied and WHERE clause checks the two condition to find which instances of the dataset are satisfying them. S_NO. s_NAME S_AGE S_SECTION 1 Yash 20 A 2 Vishwash 21 A Differences between FROM Clause and WHERE Clause : S_NO. FROM Clause WHERE Clause 1. It is used to select the dataset on which manipulation has to be done. It is used for checking some conditions to filter result 2. We provide some dataset into the FROM clause as a input. In WHERE clause we give some condition as input. 3. FROM clause selects dataset to provide it to WHERE clause for applying conditions given in query. WHERE clause act as selector which filters required instances from dataset provide by FROM clause. 4. FROM clause is mandatory because if there is no dataset, no manipulation can be performed. WHERE is optional, we use it only in case of condition checking. Comment More infoAdvertise with us Next Article Difference between From and Where Clause in SQL Y ypsjnv2013 Follow Improve Article Tags : SQL Similar Reads SQL Interview Questions Are you preparing for a SQL interview? SQL is a standard database language used for accessing and manipulating data in databases. It stands for Structured Query Language and was developed by IBM in the 1970's, SQL allows us to create, read, update, and delete data with simple yet effective commands. 15+ min read SQL Tutorial Structured Query Language (SQL) is the standard language used to interact with relational databases. Whether you want to create, delete, update or read data, SQL provides the structure and commands to perform these operations. SQL is widely supported across various database systems like MySQL, Oracl 8 min read Non-linear Components In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co 11 min read SQL Commands | DDL, DQL, DML, DCL and TCL Commands SQL commands are crucial for managing databases effectively. These commands are divided into categories such as Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), Data Query Language (DQL), and Transaction Control Language (TCL). In this article, we will e 7 min read SQL Joins (Inner, Left, Right and Full Join) SQL joins are fundamental tools for combining data from multiple tables in relational databases. Joins allow efficient data retrieval, which is essential for generating meaningful observations and solving complex business queries. Understanding SQL join types, such as INNER JOIN, LEFT JOIN, RIGHT JO 5 min read Spring Boot Tutorial Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance 10 min read Class Diagram | Unified Modeling Language (UML) A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact 12 min read SQL Query Interview Questions SQL or Structured Query Language, is the standard language for managing and manipulating relational databases such as MySQL, Oracle, and PostgreSQL. It serves as a powerful tool for efficiently handling data whether retrieving specific data points, performing complex analysis, or modifying database 15+ min read Backpropagation in Neural Network Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and 9 min read 3-Phase Inverter An inverter is a fundamental electrical device designed primarily for the conversion of direct current into alternating current . This versatile device , also known as a variable frequency drive , plays a vital role in a wide range of applications , including variable frequency drives and high power 13 min read Like