Solved

where is my table ?

Posted on 2004-09-12
4
178 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 100 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 150 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Update trigger 5 18
Show Results for Latest DateTime in a View 27 25
sql server service accounts 4 24
SQL Query assistance 16 24
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 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