Whenever I go for interview for Software engineer job I face this question for SQL Server 2005, so my advice for those who want to get success in interview must have answers for the following questions.
What are indexes and what types are they?
What is the difference between Stored Procedures and Functions?
What is the core difference in Clustered and Non-Clustered Indexes?
What is the difference between Unique Key and Primary Key?
What is Normalization?
What are the Joins and its types?
Differentiate between INNER JOIN and OUTER JOIN?
What is Cross JOIN?
I'll give post answers for this question later.
Friday, February 26, 2010
Friday, October 30, 2009
Simple Timezone Table for SQL Server 2005/2008
Today I need a simple timezone table for SQL Server 2008, I do searching for different resources but didn't find any. So I compile it, developer normally frustrating when then have to search and didn't find a proper resource. So, I'm available it all those they are in hurry and want to use it.
Following is the script and insert values for the table.
create table timezonedetail (
TimezoneID int identity(1,1) primary key,
TimezoneValue int,
GMT varchar(64) Not Null,
Location varchar(256) Not Null
)
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('0','GMT-12:00','International Date Line West')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('1','GMT-11:00','Midway Island, Samoa')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('2','GMT-10:00','Hawaii')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('3','GMT-09:00','Alaska')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('4','GMT-08:00','Pacific Time (US & Canada); Tijuana')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('10','GMT-07:00','Mountain Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('13','GMT-07:00','Chihuahua, La Paz, Mazatlan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('15','GMT-07:00','Arizona')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('20','GMT-06:00','Central Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('25','GMT-06:00','Saskatchewan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('30','GMT-06:00','Guadalajara, Mexico City, Monterrey')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('33','GMT-06:00','Central America')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('35','GMT-05:00','Eastern Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('40','GMT-05:00','Indiana (East)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('45','GMT-05:00','Bogota, Lima, Quito')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('50','GMT-04:00','Atlantic Time (Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('55','GMT-04:00','Caracas, La Paz')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('56','GMT-04:00','Santiago')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('60','GMT-03:30','Newfoundland')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('65','GMT-03:00','Brasilia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('70','GMT-03:00','Buenos Aires, Georgetown')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('73','GMT-03:00','Greenland')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('75','GMT-02:00','Mid-Atlantic')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('80','GMT-01:00','Azores')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('83','GMT-01:00','Cape Verde Is.')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('85','GMT','Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('90','GMT','Casablanca, Monrovia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('95','GMT+01:00','Belgrade, Bratislava, Budapest, Ljubljana, Prague')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('100','GMT+01:00','Sarajevo, Skopje, Warsaw, Zagreb')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('105','GMT+01:00','Brussels, Copenhagen, Madrid, Paris')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('110','GMT+01:00','Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('113','GMT+01:00','West Central Africa')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('115','GMT+02:00','Bucharest')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('120','GMT+02:00','Cairo')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('125','GMT+02:00','Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('130','GMT+02:00','Athens, Beirut, Istanbul, Minsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('135','GMT+02:00','Jerusalem')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('140','GMT+02:00','Harare, Pretoria')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('145','GMT+03:00','Moscow, St. Petersburg, Volgograd')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('150','GMT+03:00','Kuwait, Riyadh')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('155','GMT+03:00','Nairobi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('158','GMT+03:00','Baghdad')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('160','GMT+03:30','Tehran')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('165','GMT+04:00','Abu Dhabi, Muscat')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('170','GMT+04:00','Baku, Tbilisi, Yerevan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('175','GMT+04:30','Kabul')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('180','GMT+05:00','Ekaterinburg')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('185','GMT+05:00','Islamabad, Karachi, Tashkent')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('190','GMT+05:30','Chennai, Kolkata, Mumbai, New Delhi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('193','GMT+05:45','Kathmandu')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('195','GMT+06:00','Astana, Dhaka')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('200','GMT+06:00','Sri Jayawardenepura')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('201','GMT+06:00','Almaty, Novosibirsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('203','GMT+06:30','Rangoon')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('205','GMT+07:00','Bangkok, Hanoi, Jakarta')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('207','GMT+07:00','Krasnoyarsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('210','GMT+08:00','Beijing, Chongqing, Hong Kong, Urumqi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('215','GMT+08:00','Kuala Lumpur, Singapore')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('220','GMT+08:00','Taipei')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('225','GMT+08:00','Perth')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('227','GMT+08:00','Irkutsk, Ulaan Bataar')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('230','GMT+09:00','Seoul')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('235','GMT+09:00','Osaka, Sapporo, Tokyo')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('240','GMT+09:00','Yakutsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('245','GMT+09:30','Darwin')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('250','GMT+09:30','Adelaide')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('225','GMT+10:00','Canberra, Melbourne, Sydney')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('260','GMT+10:00','Brisbane')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('265','GMT+10:00','Hobart')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('270','GMT+10:00','Vladivostok')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('275','GMT+10:00','Guam, Port Moresby')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('280','GMT+11:00','Magadan, Solomon Is., New Caledonia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('285','GMT+12:00','Fiji, Kamchatka, Marshall Is.')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('290','GMT+12:00','Auckland, Wellington')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('300','GMT+13:00','Nuku''alofa')
Following is the script and insert values for the table.
create table timezonedetail (
TimezoneID int identity(1,1) primary key,
TimezoneValue int,
GMT varchar(64) Not Null,
Location varchar(256) Not Null
)
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('0','GMT-12:00','International Date Line West')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('1','GMT-11:00','Midway Island, Samoa')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('2','GMT-10:00','Hawaii')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('3','GMT-09:00','Alaska')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('4','GMT-08:00','Pacific Time (US & Canada); Tijuana')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('10','GMT-07:00','Mountain Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('13','GMT-07:00','Chihuahua, La Paz, Mazatlan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('15','GMT-07:00','Arizona')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('20','GMT-06:00','Central Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('25','GMT-06:00','Saskatchewan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('30','GMT-06:00','Guadalajara, Mexico City, Monterrey')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('33','GMT-06:00','Central America')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('35','GMT-05:00','Eastern Time (US & Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('40','GMT-05:00','Indiana (East)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('45','GMT-05:00','Bogota, Lima, Quito')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('50','GMT-04:00','Atlantic Time (Canada)')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('55','GMT-04:00','Caracas, La Paz')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('56','GMT-04:00','Santiago')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('60','GMT-03:30','Newfoundland')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('65','GMT-03:00','Brasilia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('70','GMT-03:00','Buenos Aires, Georgetown')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('73','GMT-03:00','Greenland')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('75','GMT-02:00','Mid-Atlantic')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('80','GMT-01:00','Azores')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('83','GMT-01:00','Cape Verde Is.')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('85','GMT','Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('90','GMT','Casablanca, Monrovia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('95','GMT+01:00','Belgrade, Bratislava, Budapest, Ljubljana, Prague')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('100','GMT+01:00','Sarajevo, Skopje, Warsaw, Zagreb')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('105','GMT+01:00','Brussels, Copenhagen, Madrid, Paris')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('110','GMT+01:00','Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('113','GMT+01:00','West Central Africa')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('115','GMT+02:00','Bucharest')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('120','GMT+02:00','Cairo')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('125','GMT+02:00','Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('130','GMT+02:00','Athens, Beirut, Istanbul, Minsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('135','GMT+02:00','Jerusalem')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('140','GMT+02:00','Harare, Pretoria')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('145','GMT+03:00','Moscow, St. Petersburg, Volgograd')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('150','GMT+03:00','Kuwait, Riyadh')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('155','GMT+03:00','Nairobi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('158','GMT+03:00','Baghdad')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('160','GMT+03:30','Tehran')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('165','GMT+04:00','Abu Dhabi, Muscat')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('170','GMT+04:00','Baku, Tbilisi, Yerevan')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('175','GMT+04:30','Kabul')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('180','GMT+05:00','Ekaterinburg')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('185','GMT+05:00','Islamabad, Karachi, Tashkent')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('190','GMT+05:30','Chennai, Kolkata, Mumbai, New Delhi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('193','GMT+05:45','Kathmandu')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('195','GMT+06:00','Astana, Dhaka')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('200','GMT+06:00','Sri Jayawardenepura')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('201','GMT+06:00','Almaty, Novosibirsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('203','GMT+06:30','Rangoon')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('205','GMT+07:00','Bangkok, Hanoi, Jakarta')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('207','GMT+07:00','Krasnoyarsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('210','GMT+08:00','Beijing, Chongqing, Hong Kong, Urumqi')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('215','GMT+08:00','Kuala Lumpur, Singapore')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('220','GMT+08:00','Taipei')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('225','GMT+08:00','Perth')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('227','GMT+08:00','Irkutsk, Ulaan Bataar')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('230','GMT+09:00','Seoul')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('235','GMT+09:00','Osaka, Sapporo, Tokyo')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('240','GMT+09:00','Yakutsk')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('245','GMT+09:30','Darwin')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('250','GMT+09:30','Adelaide')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('225','GMT+10:00','Canberra, Melbourne, Sydney')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('260','GMT+10:00','Brisbane')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('265','GMT+10:00','Hobart')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('270','GMT+10:00','Vladivostok')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('275','GMT+10:00','Guam, Port Moresby')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('280','GMT+11:00','Magadan, Solomon Is., New Caledonia')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('285','GMT+12:00','Fiji, Kamchatka, Marshall Is.')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('290','GMT+12:00','Auckland, Wellington')
INSERT INTO timezonedetail (TimezoneValue, GMT, Location) values ('300','GMT+13:00','Nuku''alofa')
Subscribe to:
Posts (Atom)