About 2,470,000 results
Open links in new tab
  1. SQL asterisk(*) all possible uses - Stack Overflow

    Apr 13, 2020 · It is used in sql-server for xml. In the code below, aliasing the subquery as ' [*]' means that COLUMN_NAME and DATA_TYPE xml nodes output on the same level as …

  2. What is the use of the square brackets [] in sql statements?

    The Microsoft book for SQL course says "You should use two-part names to refer to tables in SQL Server databases, such as Sales.Customer" so they don't ask to surround namespace with …

  3. SQL: IF clause within WHERE clause - Stack Overflow

    Sep 18, 2008 · Is it possible to use an IF clause within a WHERE clause in MS SQL? Example: WHERE IF IsNumeric(@OrderNumber) = 1 OrderNumber = @OrderNumber ELSE …

  4. SQL WITH clause example - Stack Overflow

    Sep 23, 2012 · 353 The SQL WITH clause was introduced by Oracle in the Oracle 9i release 2 database. The SQL WITH clause allows you to give a sub-query block a name (a process also …

  5. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server. SELECT CAST( CASE WHEN Obsolete = 'N' or InStock = 'Y' THEN 1 ELSE 0 …

  6. sql - Incorrect syntax near '' - Stack Overflow

    SELECT TOP 1000 * FROM master.sys.procedures as procs left join master.sys.parameters as params on procs.object_id = params.object_id This seems totally correct, but I keep getting …

  7. sql - How do I split a delimited string so I can access individual ...

    Nov 2, 2015 · Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which …

  8. SQL Replace multiple different characters in string

    Aug 30, 2016 · SQL Replace multiple different characters in string Asked 9 years, 2 months ago Modified 1 year, 2 months ago Viewed 223k times

  9. How to calculate percentage with a SQL statement

    Due to precedence of SQL statements it will be the same. however, due to data types if using 100 you can still get the result rounded to 0 decimals you desire for the % where as if you put it …

  10. sql - Must declare the scalar variable - Stack Overflow

    @RowFrom int @RowTo int are both Global Input Params for the Stored Procedure, and since I am compiling the SQL query inside the Stored Procedure with T-SQL then using …