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...

Consider a table with 8 rows 4 rows contains value 0 and 4
rows contains value 1.Now write a single update query to make
all 0's as 1 and all 1's as 0

Answer Posted / ajay sharma

UPDATE mytable set mycolumn = (mycolumn + 1)%2

Is This Answer Correct ?    21 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any difference between primary key and unique with the not null condition?

927


Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?

1167


Can we write ddl in trigger?

904


What is meant by indexing files?

1025


Who developed sql server?

921


What are commit and rollback in sql?

1098


What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

2744


What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration

1001


What are the types of database schema? : sql server analysis services, ssas

1107


Give me any three differences between Truncate and Delete.

1083


What is transaction server isolation?

1010


Which is better statement or preparedstatement?

901


What are the advantages to use stored procedures?

1083


What command must you use to include the not null constraint after a table has already been created?

1123


How do I find the transaction log size in sql server?

947