About 3,950,000 results
Open links in new tab
  1. WHERE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 22, 2024 · The following examples show how to use some common search conditions in the WHERE clause. FROM DimEmployee . WHERE LastName = 'Smith' ; . FROM DimEmployee . …

  2. SQL Server WHERE Clause - SQL Server Tutorial

    To retrieve rows that satisfy one or more conditions, you use the WHERE clause in the SELECT statement. Here’s the syntax of the WHERE clause: SELECT select_list FROM table_name …

  3. Connect and Query SQL Server Using SSMS | Microsoft Learn

    Apr 16, 2025 · To connect to your SQL Server instance, follow these steps: Start SQL Server Management Studio. The first time you run SSMS, the Connect to Server window opens. If it …

  4. SELECT examples (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 22, 2024 · This article provides examples of using the SELECT statement. The code samples in this article use the AdventureWorks2022 or AdventureWorksDW2022 sample database, …

  5. sql - Using a SELECT statement within a WHERE clause - Stack Overflow

    Is there a name to describe using a SELECT statement within a WHERE clause? Is this good/bad practice? Would this be a better alternative? SELECT ScoresTable.* (SELECT Date, …

  6. sql server - Microsoft SQL. SELECT FROM WHERE query with varchar

    Be sure to fully qualify the table name, or use a use databaseName; GO statement at the top of the document, or select the active database from the drop down at the top of the query pane, …

  7. How to query data using a SELECT statement in SQL Server

    Let’s fire up SQL Server Management Studio and see how we can use some of that stuff. All of the following examples use the sample AdventureWorks2012 database. This first example is …

  8. SQL Server SELECT Examples

    Apr 12, 2021 · This tutorial will teach you how you can use SELECT to read, aggregate and sort data from one or more database tables. All queries in this SQL tutorial are written on the …

  9. select * from where table=Today's Date in SQL Server Management Studio ...

    Aug 19, 2017 · select h.* from hist h where checkdt = cast(getdate() as date) and status = 'R' and PSPAY is not null; In SQL Server, the cast() can still make use of an index, so this is the best …

  10. SQL FROM Query Examples and Syntax - SQL Server Tips

    Apr 16, 2024 · SQL SELECT statement with all columns from the view. SELECT [CustomerId], [CustomerName], [Active] FROM [dbo].[vCustomersActive]; GO The screenshot below shows …