About 22,000,000 results
Open links in new tab
  1. using "USE" keyword Vs. full table name in T-SQL

    Feb 18, 2014 · I'd tend to use [server].[database].[schema].[table] in instances where a script may query mutliple tables from multiple databases. The USE [database] would typically be used in scenarios …

  2. sql - What is SELF JOIN and when would you use it? - Stack Overflow

    Jun 13, 2024 · You use a self join when a table references data in itself. E.g., an Employee table may have a SupervisorID column that points to the employee that is the boss of the current employee. To …

  3. How to declare variable and use it in the same Oracle SQL script ...

    The question is about to use a variable in a script means to me it will be used in SQL*Plus. The problem is you missed the quotes and Oracle can not parse the value to number.

  4. sql - Can I use multiple "with"? - Stack Overflow

    Nov 24, 2015 · These are CTEs - Common Table Expressions. They are more like... named queries that you can use as if they were tables... or rather more like views. Please google them. They are neat. It …

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

    Sep 15, 2008 · I prefer the conciseness when compared with the expanded CASE version. Both IIF() and CASE resolve as expressions within a SQL statement and can only be used in well-defined …

  6. How to use SQL LIKE condition with multiple values in PostgreSQL?

    Is there any shorter way to look for multiple matches: SELECT * from table WHERE column LIKE "AAA%" OR column LIKE "BBB%" OR column LIKE "CCC%" This questions applies to PostgreSQL ...

  7. sql server - sql use statement with variable - Stack Overflow

    Within SQL, you've only got the sp_sqlexec approach; the other option is to construct the SQL sequence of USE/SELECT externally. You'll still need to construct the SQL by hand but, on the plus side, your …

  8. When to begin T-SQL query with USE? - Stack Overflow

    Jan 4, 2010 · The USE statement changes the current database for the connection, so if one statement expects to run in the MyDatabase database (but doesn't specify it with a USE MyDatabase …

  9. Should I use != or <> for not equal in T-SQL? - Stack Overflow

    I have seen SQL that uses both != and <> for not equal. What is the preferred syntax and why? I like !=, because <> reminds me of Visual Basic.

  10. How to read SQL Table data into a C# DataTable - Stack Overflow

    May 20, 2011 · I've read a lot of posts about inserting a DataTable into a SQL table, but how can I pull a SQL table into a C#/.NET DataTable?