[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • 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
 
luaniCommented:
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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