• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

SQL

HI,

how to change field in sql, but i want that datas remain
i have field date and i want to change to datetime, but i want that datas stays in that new field

Thx
0
hrvica5
Asked:
hrvica5
1 Solution
 
Luan JubicaProject ManagerCommented:
ALTER TABLE yourtable
ALTER COLUMN yourdatefield DATETIME NULL

or use the Enterprise Manager and go to you database->Tables->Design Table and manually change the type of the field.

the conversion should be automatic, but backup you database anyway.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now