Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

where is my table ?

Posted on 2004-09-12
4
Medium Priority
?
217 Views
Last Modified: 2012-06-27
Hi Experts,

   I tried to create a table as follows but then I couldn't find it in my computer! Does anyone know where the table locate ?
 or I should create a database before I create a table ? how do I do that ? thanks !

C:\MSDERelA>OSQL -E
1> create table employee (firstname varchar(15), lastname varchar(15), title var
char(30), age number(3), salary number(6,2)) ;
0
Comment
Question by:meow00
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:jdlambert1
jdlambert1 earned 400 total points
ID: 12040230
Each table doesn't get a separate file, they're all in a file with an extension of .mdf or .ndf. Typically, the files have the name of the database, like if your database is named  "Corp" then the tables (and other things) would be stored in a file called "corp.mdf"
0
 
LVL 1

Author Comment

by:meow00
ID: 12040363
so .... after I create a database Company, how do I specify that this table belongs to the Company database ? Thanks !
0
 
LVL 10

Accepted Solution

by:
AaronAbend earned 600 total points
ID: 12040408
most likely, your table is in the Master database, since that is where you go by default using the command you showed. If the user was set up with a specific database, you would go there.

If you have a database called Company ("create database company" will do it, though it will be a very small  database which could cause performance problems - best bet is to use Enterprise Manager and try to determine how large the database will get, in MB, and enter that in the database file tab of the create database dialog).

Once you log in, type

use company
go

and now you will be "in" the company database, and the actions you take will create tables in that database and modify data in that database.
0
 
LVL 15

Expert Comment

by:jdlambert1
ID: 12040514
meow, do you have the SQL Server tools: Enterprise Manager, Query Analyzer, DTS, etc?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question