GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  SQL Server
Go To First  |  Previous Question  |  Next Question 
 SQL Server  |  Question 33 of 68    Print  
How to create table with same strecture of the existing table in same data base in sql server2000

  
Total Answers and Comments: 2 Last Update: April 23, 2008     Asked by: mvkrishna 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 06, 2007 05:36:31   #1  
ramakrishnasri Member Since: December 2007   Contribution: 3    

RE: How to create table with same strecture of the existing table in same data base in sql server2000
hai

here is the example for ypour qustion

select * into emp1 from emp where 1 9


execute this u can have the structure of the new table as old with out the data in the new table


i hope it will solve your problem

 
Is this answer useful? Yes | No
April 23, 2008 11:13:48   #2  
rudatha Member Since: November 2007   Contribution: 1    

RE: How to create table with same strecture of the existing table in same data base in sql server2000
select * into new table name from old table name where 1 0
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Data objects are basic runtime entities. ...

I have a table in sql server with two fields named 'start_time' and 'stop_time'. both fields have datatype set as 'datetime'. now I want to subtract the 'start_time' from 'stop_time'? I have tried datediff() fuction,but no use. I want the correct outpput of date as well as time . Need help as early as possible.


Latest Answer : use TableLocks or RowLocks to prevent the other user from modifying the data when the previous user is using the same data. ...
Read Answers (2) | Asked by : techmind

Assume that I have created a employees table which has 10 records. How to create a stored procedure to export all the records into the log file.
Read Answers (3) | Asked by : vani

Latest Answer : Yes, there is table partitioning in SQL Server. Unfortunately I don't know how to do that, If anyone knows that, let me know. ...

How do I lock a column, once records are entered into the table they can not be edited. Also how can I lock the field where only certain values are accepted?  
Latest Answer : May be you can use Constraints. ...

Suppose you create a students record with 5 marks, total and average.How to filter the top 3 students which are getting high average.
Read Answers (3) | Asked by : P.Prabhakaran

Latest Answer : We can copy the Table structure also from one table to another tableExample:                   CREATE table emp1 as                    ...
Read Answers (3) | Asked by : penchal

Latest Answer : select * into new table name from old table name where 1=0 ...
Read Answers (2) | Asked by : mvkrishna


 Sponsored Links

 
Related Articles

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

ODP.NET - Techniques to Improve Performance while Retrieving Data

ODP NET Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle Volumes of books would not be enough to cover every aspect of performance tuning in Oracle However in this section we will only discuss the fundamental performance techniques while working
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving Typed Data

ODP NET Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names mosgoogle Retrieving Typed Data Using Ordinals ODP NET provides data specific enum
 

ODP.NET - Retrieving Data Using OracleDataReader

ODP NET Retrieving Data Using OracleDataReader OracleDataReader is simply a read only and forward only result set It works only if the database connection is open and it makes sure that the connection is open while you are retrieving data As the data that it retrieves is read only it is a bit faster
 

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape