Here are some simple T-SQL examples I came across that I wasn’t aware of.
Select * from tblTest Where TestName Like '[ABC]%' (Return all rows of name start with A / B / C)
Select * from tblTest Where TestName Like '[^ABC]%' (Return all rows of name not start with A and B and C)
Select * into #test from tblTest (Create temporary table #test and insert all records from tblTest)
Select db_name() (shows the database name which you are working on)
Select @@Servername (Shows name of the server)