ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Can I remove the default constraint columns in SQL SERVER?
 Question Submitted By :: Ruban
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Can I remove the default constraint columns in SQL SERVER?
Answer
# 1
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 ?    5 Yes 2 No
Yvbchowdary
 
  Re: Can I remove the default constraint columns in SQL SERVER?
Answer
# 2
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 ?    0 Yes 1 No
Krishnakumar
 
 
 
  Re: Can I remove the default constraint columns in SQL SERVER?
Answer
# 3
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 ?    1 Yes 0 No
Pooja Khanna
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How to delete particular value in the column of a table.Is it possible or not?if possible give it as in query.  4
create index a on employee(dno) In this,which index was created?  2
can you any body tell me simple recovery,full recovery,bulk logged recovery where can use?  1
What is the difference between a stored procedure and a user defined function in sql server? Millennium2
What is a view? is View updatable? IBM11
how to count datewise data in sqlserver IndusInd-Bank3
How many index keys possible for a table  6
How do we rollback the table data in SQL Server  3
can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize(values can be 1,2,3) Table 2 has 2 columns: EmployeeId, Region Write SQL to Find the region which has the largest number of people with Tshirt size=3 Google10
Assume,there are three tables in a database, Can i have both primary key and foreign key for each table in the same database?  4
How to Run a Query on a Remote SQL Server?  2
Explain Trigger with an example?  1
Which stored procedure will you be running to add a linked server?  1
syntax for deleting the database in T SQL  4
What are the new features in SQL Server 2005? Emphasis2
What does it mean to have quoted_identifier on? What are the implications of having it off?  2
What are the four main query statements?  3
please tell me the query to get details of the employee having the second largest salary 247Customer8
How to retrieve duplicate rows in a table? How to delete the duplicate entries in a table? Leo-Technologies12
What is the difference between a Application Server and a Database Oracle2
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com