Can anyone please tell me how can i copy a table.

thank you.

and also how to fin out the second highest value of a field in a table. eg. select the employee cashing in the second highest salary in the company.

Thanks a lot.

You can select the second highest value using a subquery:

select top 1 * from
(select top 2 * from employee order by salary desc) as tmp
order by tmp.salary

--------------------
http://www.ahewd.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.