Alter Table MSSQL Database Server Tutorial

How To Alter Table In MSSQL Database Server Tutorial Example

Run microsoft sql server management studio query editor or any client tools you like then copy & paste the below code to alter a table usinq sql command or statement in MSSQL Database Server Tutorial Example

/*
   CREATE TABLE executives
   (
    lastname varchar(50) NOT NULL,
    department varchar(50) NULL,
    join_date date NULL,
    salary numeric(18, 0) NOT NULL
   ) ON [PRIMARY]
*/
   ALTER TABLE executives
   ALTER COLUMN salary numeric(11,0)
 
   /* */ is multiline code comment :: before alter; create a table executives using blocked sql code, if it is not created yet.
   -- is comment in MSSQL
   -- in fact it is comment in Oracle and MySQL as well

How To Alter Table In MSSQL Database Server Tutorial Example - Result in Microsoft Sql Server Management Studio Query Editor Client Tools

No comments:

Post a Comment

leave your comments here..