Ad Code

Datetime,Interval and Alter in MS Sql


1. When i store data 01-03-2012 in a field defined as datetime type, in table very long value appears how can i change datetime format as i needed
2. What is the difference in datetime, date, and interval type
3. I could not find command to see the current structure of table in query analyzer before putting alter table command

1) If you are using later version like MS SQL Server 2005, you can try to use DATE data type instead of DATETIME.
2) In datetime data type, date and time would be shown in the table. Whereas in date datatype only date would be shown.
3) You can use desc <table_name> command for this purpose.
Reactions

Post a Comment

0 Comments