locked
how can i change the type of the id column from bigint to int RRS feed

  • Question

  • Hello, 
    I am trying to optimize a database that is running on windows ce.

    How can i change the type of the id column from bigint to int ?

    By the way, one of my tables is more than 50'000 rows and the select count(*) from mytable takes more than 2 seconds.

    Is it normal that it is so slow ? (it s running on a windows ce device Intel PXA255, 400MHz)


    Steve
    Saturday, December 20, 2008 7:44 PM

Answers

  • Something like this?:

    create table testint (id bigint)  
    GO  
    ALTER TABLE testint ALTER COLUMN id INT 
    GO 

    Erik Ejlskov Jensen, MCTS: WM App, MCITP: SQL 2008 Dev - Please mark as answer, if this was it.
    • Marked as answer by ErikEJMVP Tuesday, January 20, 2009 1:44 PM
    Sunday, December 21, 2008 1:40 PM