Solved

where is my table ?

Posted on 2004-09-12
4
186 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

856 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