Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can I remove the default constraint columns in SQL SERVER?

Answers were Sorted based on User's Feedback



Can I remove the default constraint columns in SQL SERVER?..

Answer / yvbchowdary

yes u can delete the default constraint. First find out the
constraint name for the default and then execute the
following quey

alter table <table-name> drop constraint <constraint-name>

Is This Answer Correct ?    8 Yes 2 No

Can I remove the default constraint columns in SQL SERVER?..

Answer / pooja khanna

As i understand this question is not about removing the
constraint in a column. It is about removing the columns
containing default constraint.
If it is about removing the default constraint then given
answer no. 1 is absolutely correct.It's quite a bit similar.
However, if you want to remove column containing default
constraint,first you need to drop the default constraint
then you can remove the column/'s :-

First remove the constraint :
eg :- as answer 1.
step 1:- alter table <table-name> drop constraint
<constraint-name>

step 2: alter table <table-name>
drop column <column-name>

Is This Answer Correct ?    3 Yes 0 No

Can I remove the default constraint columns in SQL SERVER?..

Answer / krishnakumar

table create time must constraint name is important..create
time not use constraint name don't delete don't delete
constraint column

alter table table_name drop constraint <constraint name>
table create time use this query
create table delete_table(emp_id int constraint del_pk
primary key,age int)

constraint name delere query
.............................

alter table delete_table drop constraint del_pk

Is This Answer Correct ?    2 Yes 1 No

Can I remove the default constraint columns in SQL SERVER?..

Answer / suraj

-- CONSTRAINTS are used to limit the type of data that
can go in to a table.
-- You can have multiple CONSTRAINTS in any one column
of a table.
-- You don't have to drop CONSTRAINTS in order to be
able to drop the table.

Is This Answer Correct ?    0 Yes 0 No

Can I remove the default constraint columns in SQL SERVER?..

Answer / vikas

Default is constraint and to drop any constraint in sql server
syntax is same

Alter Table TableName Drop Constraint ConstraintName

visit :

http://www.tutorialsqlserver.com/Create/Default-Value-in-Sql-Server.htm

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

explain declarative management framework (dmf) in sql server 2008?

0 Answers  


check, not null,unique

2 Answers   IBM,


What is the beast way to write CTE in SQL Server ?

0 Answers   HCL,


Can a database be shrunk with users active?

0 Answers  


What are statistics, under what circumstances they go out of date, how do you update them?

2 Answers   HCL,


What is the difference between insensitive and scroll cursor?

0 Answers  


how to insert the values in 5 table at a time with triggers . if u have any solution then co-operate me ?

1 Answers  


employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.

3 Answers  


Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

0 Answers  


Difference between Triggers and Stored Procedure

23 Answers   Claimat, HCL, Protech, Silgate,


Which is better statement or preparedstatement?

0 Answers  


Diff. b/w Full Outer Join And Cross Join?

3 Answers  


Categories