Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql table alter sql 2005

Posted on 2011-02-17
4
Medium Priority
?
260 Views
Last Modified: 2012-05-11
i need modify a data type from bit to int how can i modify.

table name is xyz id is primary key and qty is bit i want to modify from bit to int.
0
Comment
Question by:romeiovasu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
mcv22 earned 500 total points
ID: 34923785
ALTER TABLE xyz ALTER COLUMN qty INT NULL
0
 
LVL 23

Assisted Solution

by:Rajkumar Gs
Rajkumar Gs earned 1000 total points
ID: 34923786
Execute this query
alter table xyz 
  alter column qty  int

Open in new window


Also you can modify it through Microsoft SQL Server Management Studio GUI
0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 500 total points
ID: 34923804
0
 
LVL 23

Assisted Solution

by:Rajkumar Gs
Rajkumar Gs earned 1000 total points
ID: 34923836
Alternative way using Microsoft SQL Management Studio (If it is available)

1. Open Microsoft SQL Management Studio
2. Login with your valid credentials
3. Expand 'Databases'
4. Expand '<YourDatabase>'
5. Expand 'Tables'
6. Right-Click on the table you want to modify
7. Select 'Modify' from the Right-Click menu
8. Here you can see the table design in editable mode. Click on the datatype and select int instead of bit
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question