Solved

sql

Posted on 2007-03-29
2
205 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
[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 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update one rows based on previous row 5 30
Database maintenance 36 110
Delete old Sharepoint backups 2 22
T-SQL: I need to add an index on a field 5 27
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

726 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