how to solve the following

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kanyash
    New Member
    • Feb 2010
    • 1

    how to solve the following

    Hi every one!

    I an new in sql so please dont explain with the big words.
    My main problem is, i have a table that i want to change data types in certain columns.
    Here is the code that i have used

    USE [ShearAcTraining]
    ALTER TABLE Aircraftmodels
    ALTER COLUMN @Speed int,
    ALTER COLUMN @Costpermile int,
    ALTER COLUMN @FuelConsumptio n int,
    ALTER COLUMN @NoSeats int,
    ALTER COLUMN @AllUpWeight int,
    ALTER COLUMN @AUWRounded int,
    ALTER COLUMN @NoEngines int,
    ALTER COLUMN @CurrentUser nvarchar(50),
    ALTER COLUMN @EntryDate datetime

    It brings me an error message that states

    Msg 102, Level 15, State 1, Line 7
    Incorrect syntax near '@Speed'.

    Please tell me where i could be going wrong and how to solve search problems
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    The symbol "@" tells SQL Server that it's a variable, not a column name. Here, read this

    Good Luck!!!

    ~~ CK

    Comment

    Working...