Solved

sql

Posted on 2007-03-29
2
203 Views
Last Modified: 2012-05-05
Alter TABLE [table1]
      Add SV int null default 1 with values,CompanyID int null default 1 with values

Alter TABLE [table2]
      Add SD int null default 1 with values,CompanyID int null default 1 with values
I have above script to run and it works fine to me. But how to write script to delete the columns?
0
Comment
Question by:riskyricky1972
2 Comments
 
LVL 39

Expert Comment

by:appari
ID: 18821459
alter table tablename
drop column columnname
0
 
LVL 32

Accepted Solution

by:
awking00 earned 250 total points
ID: 18823913
Alter TABLE [table1]
      Drop (SV,CompanyID)
Alter TABLE [table2]
      Drop (SD,CompanyID)I
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I exclude some wording in a like statement? 39 75
syadmin MSSQL 2 66
SQL Server Insert where not exists 24 41
Simple SQL query from two tables 13 54
APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

777 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