About 2,530,000 results
Open links in new tab
  1. Should I use != or <> for not equal in T-SQL? - Stack Overflow

    Yes; Microsoft themselves recommend using <> over != specifically for ANSI compliance, e.g. in Microsoft Press training kit for 70-461 exam, "Querying Microsoft SQL Server", they say "As …

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

    @MyVariable and @myvariable are the same variables in SQL Server Man. Studio and will work. However, these variables will result in a "Must declare the scalar variable "@MyVariable" in …

  3. sql server - Database stuck in "Restoring" state - Stack Overflow

    Ran into a similar issue while restoring the database using SQL server management studio and it got stuck into restoring mode. After several hours of issue tracking, the following query worked …

  4. sql - How do I list all the columns in a table? - Stack Overflow

    Microsoft SQL Server Management Studio 2008 R2: In a query editor, if you highlight the text of table name (ex dbo.MyTable) and hit ALT + F1, you'll get a list of column names, type, length, …

  5. sql - Condition within JOIN or WHERE - Stack Overflow

    In "SQL Performance Tuning" by Peter Gulutzan and Trudy Pelzer, they tested multiple brands of RDBMS and found no performance difference. I prefer to keep join conditions separate from …

  6. sql - How do I remove the first characters of a specific column in a ...

    In SQL, how can I remove the first 4 characters of values of a specific column in a table? Column name is Student Code and an example value is ABCD123Stu1231. I want ...

  7. 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 …

  8. sql - Delete duplicate rows keeping the first row - Stack Overflow

    10 To delete the duplicate rows from the table in SQL Server, you follow these steps: Find duplicate rows using GROUP BY clause or ROW_NUMBER () function. Use DELETE …

  9. sql - Altering a column to be nullable - Stack Overflow

    I want to alter a table column to be nullable. I have used: ALTER TABLE Merchant_Pending_Functions Modify NumberOfLocations NULL This gives an error at Modify. …

  10. SQL WHERE.. IN clause multiple columns - Stack Overflow

    SELECT * FROM table1 WHERE (CM_PLAN_ID, Individual_ID) IN ( SELECT CM_PLAN_ID, Individual_ID FROM CRM_VCM_CURRENT_LEAD_STATUS WHERE Lead_Key = …