Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
547 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
A list of one owl's 5 favourite system stored procedures in SQL! Part six of a six-part series of blogs |
---|
Everyone has a favourite system stored procedure (you do, don't you?). But five? That's the subject of this blog, anyway.
|
In this blog
If you only remember one system stored procedure, this is probably the one to choose. Here are some examples of its use.
To get information about a specific table, use its name as your parameter:
-- get information on the table called DIRECTOR
sp_help 'Director'
Here's what this would show:
Lots of useful information here!
If you want to use a system (or your own) stored procedure, but can't quite remember what parameters it takes, try this:
-- what parameters does a procedure take?
sp_help 'sp_who'
This shows that this particular system stored procedure (sp_who) takes one parameter:
You must supply a single string to the procedure.
Use sp_help without any parameters to get a listing of everything in your database:
-- get a list of everything!
sp_help
Here are the first few of the 2,283 rows returned for the Wise Owl Movies database:
The first few rows returned, out of many!
And that's the end of this blog!
You can learn how to write stored procedures by attending one of our advanced SQL courses (you can attend the online version of our two-day advanced SQL course from anywhere in the world).
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.