This blog is primarily for my own reference, but if the information I found is useful to others, then that is great. If others want to contribute with comments or other information, then that is great too.
YouTube takes screenshots of the videos you upload. Here is a quick reference of how you do this on your webpage. Each YouTube video has 4 generated images. The first is a full size cover image and the rest are thumbnail images:
Ctrl+R is a good friend of mine. It is very handy to use this command not only to hide the results pane away and focus on the query, but to also be able to bring the results back just as quickly – without having to run the query again
In SSMS 2014 when I press Ctrl+R to show/hide my result pane, I was getting below message in the left bottom of SSMS.
“(Ctrl+R) was pressed. Waiting for second key of chord…”
Pressing Ctrl+R again I get message as “The key combination (Ctrl+R, Ctrl+R) is not a command”
Here is what I did to make my shortcut work again.
Go to Tools Menu in SSSMS
Click on Option
Go to Keyboard and expand the menu
Click on option Keyboard again
Enter “Window.ShowResultsPane” in Show commands containing: search box
Change the “Use new shortcut in:” dropdown to “SQL Query Editor“
Put your cursor in the “Press shortcut keys:” box and hit Ctrl+R
Click on “Assign” button before hitting OK
Unlike some other changes that still require an SQL Management Studio restart to take effect, the change takes effect immediately, and CTRL + R should start working again.
Hope this helps! Please write comment and let me know your feedback.
While searching for how to find Primary Key and Foreign Key relationship using INFORMATION_SCHEMA in SQL Server Database, I came across following query which works for me.
SELECT RC.CONSTRAINT_NAME AS ‘FK_Name’
,KF.TABLE_SCHEMA AS ‘FK_Schema’
,KF.TABLE_NAME AS ‘FK_Table’
,KF.COLUMN_NAME AS ‘FK_Column’
,RC.UNIQUE_CONSTRAINT_NAME AS ‘PK_Name’
,KP.TABLE_SCHEMA AS ‘PK_Schema’
,KP.TABLE_NAME AS ‘PK_Table’
,KP.COLUMN_NAME AS ‘PK_Column’
,RC.MATCH_OPTION AS ‘MatchOption’
,RC.UPDATE_RULE AS ‘UpdateRule’
,RC.DELETE_RULE AS ‘DeleteRule’
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC
JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KF ON RC.CONSTRAINT_NAME = KF.CONSTRAINT_NAME
JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KP ON RC.UNIQUE_CONSTRAINT_NAME = KP.CONSTRAINT_NAME
WHERE KF.COLUMN_NAME LIKE ‘%<Column Name>%’
You can also find Foreign Key using EXEC sp_fkeys ‘<TABLE NAME>’