如何在Sql Database中更改数据类型&存储过程也 [英] How Can I Change Datatype In Sql Database & Stored Procedure Also
本文介绍了如何在Sql Database中更改数据类型&存储过程也的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将数据库中的数据类型从int更改为varchar。
查询是什么?
解决方案
更新列的数据类型,请使用 ALTER TABLE [ ^ ]。
要在查询中转换数据类型,请使用< a href =http://msdn.microsoft.com/en-us/library/ms187928.aspx> CAST或CONVERT [ ^ ]
请看这里..
学习Sql命令。
http://www.w3schools.com/sql/sql_alter.asp [ ^ ]
http://www.tutorialspoint.com/sql/ sql-alter-command.htm [ ^ ]
Hi i need to change datatype in my database from int to varchar.
what is query for that?
解决方案
To update data type for column, use ALTER TABLE[^].
To convert data type in query, use CAST or CONVERT[^]
See here..
Learn Sql command.
http://www.w3schools.com/sql/sql_alter.asp[^]
http://www.tutorialspoint.com/sql/sql-alter-command.htm[^]
这篇关于如何在Sql Database中更改数据类型&存储过程也的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文