Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6806639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:44:09+00:00 2026-05-26T19:44:09+00:00

This might be a stupid question but I am learning about SQLCMD and the

  • 0

This might be a stupid question but I am learning about SQLCMD and the code for it. I don’t really understand where to put the statement in.

This is what I am suppose to do.
Use SQLCMD to output the results of the query SELECT COUNT(*) FROM Customers to the
console window.

I have never done this before so I am thrown off a little. If someone would be able to help me understand it that would be great. I have done web searches and reviewed my book but it doesnt say where you will type the code into and I am working with SQL server 2008.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:44:09+00:00Added an answer on May 26, 2026 at 7:44 pm

    I think the best way to show how it is used is with documentation. You can see the SQLCMD Reference here.

    You use sqlcmd to execute Transact-SQL against an instance\database.

    This is untested, but your example your desired command would be something like: sqlcmd -U <yourLogin> -Q "select count(*) from Customers" -S <yourMachineName>\<yourInstanceName>

    After you hit “ENTER”, you will be prompted for your password (this is provided you are using SQL Auth), and then upon authentication you will see the result of your query on the console window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a very stupid question :P But I found this really interessting:
This might be a stupid question but i would really appreciate any compact answer.
This might be a really stupid question, but I'm curious. A ping of youtube.com
This might be a very stupid question, but I still dont completely understand and
This might be a horrifically stupid question, but how would I go about doing
This might be a stupid question but if there's a better or proper way
This might be a stupid question but I just wanted to make sure... If
This might be a stupid question but I'm new at all this. I want
This might be a stupid question but I'll ask anyway, I was reading OOP
This might be a stupid question, but I can't for the life of me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.