Say if we have a table that contains only a single column ,
say OrderID, which has IDENTITY attribute defined on it. So
how can we insert data in this table.

I am reframing my question, that how can we make the table
to increment the column "OrderID" value several times???

Answer Posted / deepak

Madhu, actually the answer which u have given is quite
common. Now i m gonna tell u a new one. The above question
has one more solution that is stated below:


"Insert into Table_name DEFAULT values"


that's it.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference RDBMS and Graph Database?

800


Explain log shipping and mention its advantages.

780


Show Practically Sql Server Views are updatable?

781


What are different types of join?

949


What are various limitations of the views?

786






Detail about the hardware which is supported by SQL server?

755


How is foreign key related to primary key?

716


Explain what is log shipping?

811


What is the difference between an index and a unique index?

737


What is meant by datasource?

680


What is “asynchronous” communication in sql server service broker?

717


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2229


Explain the difference between HTTP and HTTPS in database?

746


What command would you use to create an index?

775


How sql server executes a statement with nested subqueries?

702