About 33,500,000 results
Open links in new tab
  1. SQL WHERE Clause - W3Schools

    The SQL WHERE Clause. The WHERE clause is used to filter records. It is used to extract only those records that fulfill a specified condition.

  2. sql - Function call in where clause - Stack Overflow

    Jul 1, 2016 · WHERE Phone= dbo.FormatPhone(@Phone) Now here I understand that formatting has to be applied on the variable on column. But should I apply it on variable to assign to some other local variable then use it (as below). FROM Members (NOLOCK) WHERE Phone= @SomeVar. Which way is better or both are good? EDIT: And how is first query different from.

  3. SQL | WHERE Clause - GeeksforGeeks

    Dec 3, 2024 · In this article, we will learn the WHERE clause in detail—from basic concepts to advanced ones. We’ll cover practical examples, discuss common operators, provide optimization tips, and address real-world use cases. What is the SQL WHERE Clause? The SQL WHERE clause is used to specify a condition while fetching or modifying data in a database.

  4. How do I use a SQL function inside my SQL query

    Suppose further that I want to write a SQL query that will return a list of numbers from a SQL table along with their magical values. My instinct is to write. However, this returns the error message: MAGIC is not a recognized function name. How can I make this work? MAGIC is a table-valued function even though it returns only a single value.

  5. How to Write a WHERE Clause in SQL - LearnSQL.com

    Nov 9, 2021 · In general, you can use the SQL WHERE clause to filter any rows from your tables. The basic syntax of an SQL query that uses a WHERE clause is: The WHERE clause follows the SELECT and the FROM clauses.

  6. SQL Statement using Where clause with multiple values

    Sep 8, 2016 · I want to use names selected from a multiple selection listbox, which I can retrieve the values, and then do a where clause so it shows the song names that the selected people can all play, therefore status is complete. For example: PersonName SongName Status . Holly Highland Complete. Holly Mech Complete .

  7. How to Use WHERE in SQL with Examples

    Mar 3, 2024 · Its primary function is to filter records that fulfill a specified condition, drastically narrowing down the search results from a database. This becomes especially useful when dealing with vast datasets, where efficiency and precision are key. Let’s dive into a basic example to see the WHERE clause in action.

  8. The Complete Guide to the SQL WHERE Clause | LearnSQL.com

    May 10, 2022 · Learn how to use the SQL WHERE clause to filter rows. In this comprehensive article, we cover comparison operators and the BETWEEN, IN, LIKE, AND, OR, and NOT operators. Filtering output rows is one of the first things …

  9. How to Use Aggregate Functions in WHERE Clause

    Aug 11, 2022 · New analysts might write the query using the AVG() aggregate function in the WHERE clause: First, we’re finding the average highest temperature by city. Then we’re using this result in the WHERE clause; that seems about right. But this query throws an error!

  10. Exploring the SQL WHERE statement - SQL Shack

    Jun 9, 2022 · Let’s go ahead and explore the WHERE clause, its syntax, usage for single or multiple conditions, including and excluding data based on query expression. The Where clause is helpful in the SQL Statements Select, Update, Delete for filtering data satisfying a specific condition. The following SQL query retrieves all data stored in the [SalesLT].

Refresh