x

I need to find out how many projects there are in the project table in sql query format

PROJECT P_ID PROJECT_NAME CLIENT_ID MGR_ID PARENT_P_ID 1 Hardware Support Intranet 2 105
2 Hardware Support Interface 2 103 1 3 Hardware Support Database 2 102 1 4 Teller Support System 4 105
5 Internet Advertising 6 105
6 Network Design 6 104 5 7 Exploration Database 5 102
more ▼

asked Mar 24 '10 at 12:39 PM in Default

Michael 4 gravatar image

Michael 4
9 9 9 9

This is incredibly bad form. You haven't even half-bothered, yet you're expecting someone to do your work for you. I have just formatted the code, kev has re-tagged your question, please can you consider at least putting in the bare minimum of effort?
Mar 24 '10 at 06:00 PM Matt Whitfield ♦♦
WOULD THIS BE THE ANSWER SELECT P_ID From Project Where P_ID=Project And P_ID=7
Mar 26 '10 at 08:13 PM Michael 4
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

assuming one project per row...

select count(*) as c from project 
more ▼

answered Mar 24 '10 at 02:33 PM

user-1392 gravatar image

user-1392
71 1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x672
x362
x74

asked: Mar 24 '10 at 12:39 PM

Seen: 1177 times

Last Updated: Mar 24 '10 at 05:59 PM