hw you create table in sql using existing table and variable
should be in specific order given ex : in old table empid
empname empsal empage empbirthdate empaddrs like is there in
new table we need it as EX: exmpname empage empaddrs empid
empbirthdate like we want hw we create this as a table not
view or nt reporting

Answers were Sorted based on User's Feedback



hw you create table in sql using existing table and variable should be in specific order given ex :..

Answer / raj sekhar

select empname,empage,empaddrs,empid,empbirthdate into
newemptable from oldemptable

Is This Answer Correct ?    4 Yes 1 No

hw you create table in sql using existing table and variable should be in specific order given ex :..

Answer / abhinay

select * into table_name from destination_table_name where 1=0

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Explain what is lock escalation and what is its purpose?

0 Answers  


What is a coalesce function?

0 Answers  


Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

0 Answers  


Can we call a function that has out parameter in select statement

0 Answers   Nagarro,


Tell me what is difference between clustered and non clustered index?

0 Answers  






How you would rewrite the sql query to return the customerid sorted numerically?

0 Answers  


Can a unique index be created on a column, which contains null?

0 Answers  


Is it possible to delete duplicate rows in a table without using a temporary table ?

12 Answers   TCS,


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

0 Answers  


What is the purpose of update statistics and scope_identity() function?

0 Answers  


How can you check the level of fragmentation on a table?

0 Answers  


Can sql servers link to other servers like oracle?

0 Answers  


Categories