Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Hi Group..

Author  Topic 

chetancool
Starting Member

34 Posts

Posted - 2005-06-06 : 08:38:46
Hi Group.

I have asked certain questions during my interview recently which i was unable to ans. please help me on this.

1) How to take backup of tables & views only?
2) what is the case command in sql?
3) in union clause, can group by & order by be used or not?
4) How to change / delete column for table ?
5) One database has never been backed up. One table has been deleted from that database. So how to get that table restored with it's all data? (Both mdf & ldf files are there)

help plz.

cjain

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2005-06-06 : 08:44:43
1. What do you mean ? You don't want to back up the data ? I'd just generate a script.
2. It's in Books Online
3. It's in Books Online
4. Look at the ALTER TABLE command in Books online
5. Send out your resume now . You might be able to do it with Lumigent's Log Explorer, but if you don't have a backup of a live DB, you'd likely be fired.

Do look in BOL for those extra answers though, I could tell you, but you'll have a better understanding if you find the answer yourself.



Damian
Ita erat quando hic adveni.
Go to Top of Page

chetancool
Starting Member

34 Posts

Posted - 2005-06-06 : 08:53:10
Hi Merkin.

Regarding ans of first question, What if there are 100 tables and views. It would be tedious work to generate script for each object. and yes, we have to table the back up the data also.

Regarding ans of 5th question, by your words, it means that it can not be done. IS IT?

Is there any other way out?

cjain
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2005-06-06 : 09:02:35
quote:

Regarding ans of first question, What if there are 100 tables and views. It would be tedious work to generate script for each object. and yes, we have to table the back up the data also.



You can generate a script for all tables, right click in enterprise manager on the database and choose All Tasks -> Generate Script.

If you want the data as well though, I'd do a backup.

Regarding 5, I did say you might be able to do it, but it's not guaranteed.

It seems to me that you haven't spent much time experimenting with SQL Server. I think to increase your chances of getting a job you need to develop the troubleshooting and experimentation skills to figure this stuff out yourself.

Build a database and click around and experiment with every function, read BOL a lot.


Damian
Ita erat quando hic adveni.
Go to Top of Page
   

- Advertisement -