To generate a piece of SQL code or a script in SQL Management Studio 2005, I'll need a bit more information on what you're trying to achieve. However, I can give you a basic example of creating a table, inserting data into it, and then querying that data.
SELECT * FROM Books;