Solved

where is my table ?

Posted on 2004-09-12
4
157 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
meow, do you have the SQL Server tools: Enterprise Manager, Query Analyzer, DTS, etc?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now