If you need to query all People from Person table with FirstName start with A, you can easily query like below, What if you want to list all the people from person table with first name start with A and B? You can combined Like operator with OR and query like below, But imagine scenario … Continue reading SQL Server tip : Query a range of characters ?
Have you ever thought, what if your table name 1. Is exactly as of SQL Server keyword 2. Is having space in between like Student Fav Actor If you go ahead and query against table Student Fav Actor like below, most likely you will get error message as below, There may me one more scenario … Continue reading SQL Server Tip : . Where to use SQURE Bracket around table name?
Level: Beginners [level 100] Output clause gives access to Inserted, updated or deleted rows of table. In SQL Server 2005 this was possible only through Triggers. Note: In all explanation, I am going to use School Database. You can download script from here Imagine a scenario that while inserting a value in Person table, … Continue reading Output clause in SQL Server
WAITFOR statement used to delay execution of T-SQL command for a specified period of time. This can be used to block the execution of batch statement, stored procedure and T SQL commands for a specified time. There are two parameters can be used with WAITFOR statement. Let us create simple stored procedure Let us execute … Continue reading SQL Server: WAITFOR Statement
Target Audience: Beginners SQL Server 2008 R2 comes with String Concatenation Operator. String Concatenation operator is denoted by symbol plus ‘+’. Output we will get, String concatenation operator can concatenate string with real time data of any type also. In above query , firstName and lastName column is being concatenated using string concatenation operator of … Continue reading String Concatenation and Scope Resolution Operator in SQL Server 2008 R2