Actually, I am still learning about SQL and I was reading an example as follows:
USE tempdb
GO
SET NOCOUNT ON
CREATE TABLE #testts (c1 int identity, c2 int DEFAULT 0, changelog timestamp)
INSERT #testts DEFAULT VALUES
And the example query continues...........
It's the first part, where the "USE tempdb" is located. Since reading about this and from the examples, I would assume this would have something to do with creating a table, except that nowhere can I find an explanation about why the word "USE" is used in a query.
This changes the current database you are working in.
(SQL Server, MySQL, not sure which others) codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
Yes, I am working on SQL Server. I thank you for the info. I had seen this before in different queries but did not know it's exact usage. Thank you again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.