|
|
-
|
|
I was looking into some table creation scripts in source control today. I found that the developers used two ways to check if the table exists in the database.
Few scripts employed `information_schema.tables` vs `sys.objects`. I personally, have been ...
|
|
-
11 Liked
| 11 Learned
| 6 Comments
|
|
This query comes as an answer to the following tek-tips forum thread http://tek-tips.com/viewthread.cfm?qid=1672424
The task was to extract 7 digit numbers from a string.
My solution is a simple straight-forward recursive CTE, although perhaps a b......
|
|
-
11 Liked
| 8 Learned
| 14 Comments
|
|
GO command is not only a batch seperator but also acts as while loop starting from version 2005.Run this code and see the output
[code]
select 1
Go 5
[/code]......
|
|
-
11 Liked
| 11 Learned
| 3 Comments
|
|
I just learned today new thing,"How to delete old e-mail messages from database mail internal tables with using sysmail_delete_mailitems_sp" check out following query.
[code]
USE MSDB
GO
Exec sysmail_delete_mailitems_sp @sent_before ='2011/12/14',@s......
|
|
-
11 Liked
| 12 Learned
| 1 Comments
|
|
SQL Server History
[code]
Version Year Release Name Codename
--------------- -------- ----------------------------------- --------------------
1.0 (OS/2) 1989 SQL Server 1.0 (16bit) -
1.1 (OS......
|
|
-
|
|
Table-valued parameters are a new parameter type in SQL Server 2008. Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a Transact-SQL statement or a routine, such......
|
|
-
11 Liked
| 11 Learned
| 1 Comments
|
|
Blocking and resource contention are not always the cause of locks in SQL Server therefore not always the cause of query performance degredation........
|
|
-
|
|
Go to SSMS
tools->options->Environment->keyboard->Query shortcut
Ctrl+F1 - select * from
Press Ok
Now just type the tablename,select it and press the shortcut given(here ctrl+f1)
The result is displayed.......
|
|
-
|
|
Today I learned, how we can get list of all store procedure from database which is using the given table
[code]
sp_depends <tableName>
[/code]
Thank You......
|
|
-
|
|
During working for script to send mail alerts, i just learned as we can change display name for the mail at runtime. It will normally use profile name or display name which configured in database mail profile for mail. Below query will use display name ......
|
|