Today is 12/12/12 – I am not sure when will I write this kind of date again – maybe never. This opportunity comes once in a lifetime when we have the same date, month and year all have same digit. December 12th is one of the most fantastic day in my personal life. Four years ago, this day I got married to my wife – Nupur Dave. Here are photos of our wedding (Dec 12, 2008).
Here is a very interesting photo of myself earlier this year. It is not photoshoped or modified photo. The only modification I have done here is to add arrow and speech bubble.
Every Wednesday I tried to put one SQL in Sixty Seconds Video. The journey has been fantastic and so far I have put a total of 35 SQL in Sixty Seconds Video. The goal of the video is to learn something in 1 minute. In our daily life we are all very busy and hardly have time for anything. No matter how much we are busy – we all have one minute of time. Sometime we wait for a minute in elevators, at the escalator, at a coffee shop, or just waiting for our phone reboot.
Today is a fantastic day – 12/12/12. Let me invite all of you submits SQL in Sixty Seconds idea. If I like your idea and create a sixty second video over it – you will win surprise learning material from me. There are two very simple rules of the contest: –
- I should have not have already recorded the tip.
- The tip should be descriptive. Do not just suggest to cover “Performance Tuning” or “How to Create Index” or “More of reporting services”. The tip should have around 100 words of description explaining SQL Tip.
The contest is open forever. The winner will be announced whenever I use the tip to convert to video. If I use your tip, I will for sure mention in the blog post that it is inspired from your suggestion.
Meanwhile, do not forget to subscribe YouTube Channel.
Here are my latest three videos from SQL in Sixty Seconds.
[youtube=http://www.youtube.com/watch?v=61pHO5pZ1o4]
[youtube=http://www.youtube.com/watch?v=s4tFMc861r8]
[youtube=http://www.youtube.com/watch?v=HbbRpg-tHz4]
Reference: Pinal Dave (https://blog.sqlauthority.com)
14 Comments. Leave new
Hello Pinal,
Let me take the privilege of commenting first and suggest few topics for SQL in sixty seconds.
Topics :
1. Working on SQL Profiler trace file
2. Explaining common types of deadlock
3. Monitoring Tempdb space
4. Deadlock Graph event in SQL Trace
5. How to view the SQL Server Error Log
6. Detecting Memory Pressures
7. Dynamic Management Views
Wishing you a Happy Anniversary.
-Vakul More.
Hoping that the love you shared years ago
Is still as strong today as it was
then Bringing you much joy, love and happiness
To celebrate again.
Happy Anniversary :)
Hi Pinal,
First of all Wedding day wishes to my SQL Guru. Once again we check with all the existing SQL sixty video and then suggest a topic with descriptive.
Hi Pinal,
Happy Wedding Anniversary! :)
Please find below one of the ideas on which possibly many SQL Server beginners have issues with –
Fixing Orphaned users after Restore on New instance.
Scenario: During Upgrades or Migrations, often we would have to take backups of the current Databases and Restore the same on the New Instance. When some of the beginners do that, they often forget or are not aware of the fact that there may be users which existed in the previous instance and they do not exist on the new instance.
A quick video on how to fix these orphaned users would be a great tutorial that would help them keep that in mind. :)
Thanks.
Hi Pinal,
Wish you a very happy wedding anniversary.
Best Regards..
Happy anniversary, Pinal. How about quick example of using triggers to update data in one table after another table is updated.
Hello Pinal,
Here my two suggestions for videos SQL in sixty seconds.
1- Get the max between multiple columns
exemple , my table contain 4 columns Id, Date1, Date2 and Date3 and i want get the Max bettween then.
I find solution very simple , do this request
SELECT id, (SELECT MAX([Value]) FROM
( SELECT Date1 AS [Value]
UNION ALL
SELECT Date2
UNION ALL
SELECT Date3
) AS UnionSetMax
) AS MaxDate
The column MaxDate Return the Max date between date1, date2 and date3
2- Backup database with Script and Task Sckeduler
create sql file “scriptbackup.sql” with content this cript
Backup Database MyDatabaseTo Disk = ‘E:Backup_BddMyDatabase.bak’
create file .bat “lancherbackup.bat” with content this command
sqlcmd -E -S [Sever] -i E:Backup_Bddscriptbackup.sql
Happy Wedding Anniversary
Hello Pinal,
Here my two suggestions for videos SQL in sixty seconds.
1- Get the max between multiple columns
exemple , my table contain 4 columns Id, Date1, Date2 and Date3 and i want get the Max bettween then.
I find solution very simple , do this request
SELECT id, (SELECT MAX([Value]) FROM
( SELECT Date1 AS [Value]
UNION ALL
SELECT Date2
UNION ALL
SELECT Date3
) AS UnionSetMax
) AS MaxDate
The column MaxDate Return the Max date between date1, date2 and date3
2- Planifie Backup database with Script and Task Sckeduler
create sql file “scriptbackup.sql” with content this cript
Backup Database MyDatabaseTo Disk = ‘E:Backup_BddMyDatabase.bak’
create file .bat “lancherbackup.bat” with content this command
sqlcmd -E -S [Sever] -i E:Backup_Bddscriptbackup.sql
with the task sckeduler planifie the execution of the lancherbackup.bat.
thanks
Hi Pinal,
Recently came to know very interesting bit when we do the “select count(*) from table”. Optimiser select very interesting plans when we have index on table and there there is no index.
I always thought it will scan the table but I was wrong it does index scan when have index on table.
I thought it is very interesting and hope you feel the same would share it.Please let me know if need I can send you demo code.
Anyway Happy Wedding Anniversary.
Thanks
Nachi
Hello ,
Happy Aniversary to both of you!
My first suggestion is not related to SQL.
As you have earlier recored one video regarding how you record these videos. My Suggestion is related to this. Can you record a video about how you capture this image? (As you already told, this is not photoshoped or modified) :)
Well, I will submit list of suggestion later after checking existing videos. (Related to SQL, this time :) )
Hello Pinal,
Belated Anniversary wishes to both of you :)
Please find below one of the concept which I found to be very useful in one of our requirement.
When a table is having unique index and if an attempt is made to insert duplicate data an error is thrown. Conventional method to insert data into such table from another table is to either use “NOT IN” or “NOT EXISTS”. But if the table, to which data insertion has to be made, has billions of records, there may be performance issues.
In such cases “IGNORE_DUP_KEY” property can be used. By default, for a unique index the property is set to OFF. When this property is set to ON, it will issue a warning message when a duplicate key is inserted and the particular row is ignored and also continues with the transaction. There was a good performance by using this property since %age of duplicates were less
Here a Tip,
If you ever want to use TOP keyword with dynamic number
DECLARE @count int
SET @count=10
SELECT TOP @count from Table
This will throw error
Try with
SELECT TOP (@count) from Table