Solved

where is my table ?

Posted on 2004-09-12
4
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

734 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