General discussion

Locked

SQL Server 7.0 Questions

By galahad04 ·
1. Why does each T-SQL command start with the prefix sp_? What does the sp_ stand for?
2. Please explain the basic BCP command syntax and list a few simple examples.
3. What is a transaction?
4. What is the DTC used for?
5. What is thedifference between "order by", "where", and "group by" in SQL Server?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

SQL Server 7.0 Questions

by Joseph Moore In reply to SQL Server 7.0 Questions

I only have time for question 1:
Those are stored procedures, precompiled sequences of commands.
sp_monitor runs several SQL Server statistical commands, for example, but they are all combined into this one stored procedure.
Using sp_ at the beginning is just a naming convention, but you don't have to use that for your stored procedures.

Collapse -

SQL Server 7.0 Questions

by galahad04 In reply to SQL Server 7.0 Questions

Poster rated this answer

Collapse -

SQL Server 7.0 Questions

by john_wills In reply to SQL Server 7.0 Questions

I will answer question 5, which is a question about the language SQL rather than about this particular product.
WHERE restricts the rows to be output, e.g. one can have WHERE Sex="M" and DoB < #1976.07.04# to find men born before the U.S. Bicentennial.
ORDER BY means simply that: the rows will appear in the order of the column specified, e.g. ORDER BY DoB will give you the oldest person first, then the next-oldest, and so forth.
GROUP BY is used for aggregates, e.g. max, min, avg. One obtains the maximum, or whatever, for each group defined by the group column.
SELECT Avg(salary) FROM SomeTable
GROUP BY DoB
Will yield the average salary of all the people with each birthdate.
http://www.informix.com/answers/english/docs/dbdk/infoshelf/sqls/01.toc.html, when it's working, will give you a definition of the entire SQL syntax.

Collapse -

SQL Server 7.0 Questions

by galahad04 In reply to SQL Server 7.0 Questions

Poster rated this answer

Collapse -

SQL Server 7.0 Questions

by galahad04 In reply to SQL Server 7.0 Questions

This question was closed by the author

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums