user1187
user1187

Reputation: 2198

How to export table structures and data from ms access as txt file

I am new in ms access In mysql we can export table structure as create query like the following

CREATE TABLE IF NOT EXISTS `audio_master` (
  `audio_id` int(11) NOT NULL AUTO_INCREMENT,
  `audio_title` varchar(255) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`audio_id`)
)  


INSERT INTO `audio_master` (`audio_id`, `audio_title`, `course_id`) VALUES
(1, 'java audio', 1);

Like this I need to take from MS Access. How I can export like this using ms Access or sql server

Any suggestions or answers highly appreciated

Thanks in advance

Upvotes: 4

Views: 13049

Answers (2)

Felix Pamittan
Felix Pamittan

Reputation: 31879

If you're using SQL Server Management Studio 2014:

  1. Right-click on the database and click on Tasks -> Generate Scripts...
  2. You'll be directed to an Introduction Page. Click Next.
  3. Select database objects to script. You can either script the entire database or some specific database objects only. Click Next.
  4. You'll be directed to the Set Scripting Options tab. Click the Advanced button.
  5. Under the General category, go to Types of data to script.
  6. Select Schema and data and click OK.
  7. Select output type. Click Next.
  8. Click Next then Finish.

You'll now have the CREATE TABLE statement together with the INSERT statements.


For SSMS 2008

  1. Right-click on the database and click on Tasks -> Generate Scripts...
  2. Select database objects to script. You can either script the entire database or some specific database objects only. Click Next.
  3. Under the Table/View Options category, go to Script Data and set it to True.
  4. Choose object types. Click Next and select the SPs, Tables or Views you want to script.
  5. Choose from Output Option. You can either Script to file or Script to New Query Window. Click Next, then Finish.

Upvotes: 5

VAGALLA SURESH REDDY
VAGALLA SURESH REDDY

Reputation: 39

Hi You have Import and export option. Please find the bellow link, like this you follow and change the source and destinations.

http://sqlvagalla.blogspot.in/search?q=import

enter link description here

Upvotes: 0

Related Questions