SELECT Top columns


SQL Server Query

            
SELECT TOP (20) EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate,  
HireDate, Address, City, Region, PostalCode, Country, HomePhone,
Extension, Photo, Notes, ReportsTo, PhotoPath FROM Employees;

Create SQL query with SqlQueryBuilder

            
var (sql, parameters) = new SqlQueryBuilder()  
.Select().Top(20)
.Columns("EmployeeID","LastName","FirstName","Title","TitleOfCourtesy","BirthDate")
.Columns("HireDate","Address","City","Region","PostalCode","Country","HomePhone")
.Columns("Extension","Photo","Notes","ReportsTo","PhotoPath")
.From("Employees")
.Build();

Query build by SqlQueryBuilder

            
SELECT TOP 20 EmployeeID,
              LastName,
              FirstName,
              Title,
              TitleOfCourtesy,
              BirthDate,
              HireDate,
              Address,
              City,
              Region,
              PostalCode,
              Country,
              HomePhone,
              Extension,
              Photo,
              Notes,
              ReportsTo,
              PhotoPath
FROM Employees;


            
        

Parameters (If used)

Name Value

Query Results:

  EmployeeID LastName FirstName Title TitleOfCourtesy BirthDate HireDate Address City Region PostalCode Country HomePhone Extension Photo Notes ReportsTo PhotoPath FullName NameDifference
1 1 Davolio Nancy Sales Representative Ms. 12/8/1948 12:00:00 AM 5/1/1992 12:00:00 AM 507 - 20th Ave. E.Apt. 2A Seattle WA 98122 USA (206) 555-9857 5467 System.Byte[] Education includes a BA in psychology from Colorado State University in 1970. She also completed "The Art of the Cold Call." Nancy is a member of Toastmasters International. 2 http://accweb/emmployees/davolio.bmp
2 2 Fuller Andrew Vice President, Sales Dr. 2/19/1952 12:00:00 AM 8/14/1992 12:00:00 AM 908 W. Capital Way Tacoma WA 98401 USA (206) 555-9482 3457 System.Byte[] Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association. http://accweb/emmployees/fuller.bmp
3 3 Leverling Janet Sales Representative Ms. 8/30/1963 12:00:00 AM 4/1/1992 12:00:00 AM 722 Moss Bay Blvd. Kirkland WA 98033 USA (206) 555-3412 3355 System.Byte[] Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992. 2 http://accweb/emmployees/leverling.bmp
4 4 Peacock Margaret Sales Representative Mrs. 9/19/1937 12:00:00 AM 5/3/1993 12:00:00 AM 4110 Old Redmond Rd. Redmond WA 98052 USA (206) 555-8122 5176 System.Byte[] Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992. 2 http://accweb/emmployees/peacock.bmp
5 5 Buchanan Steven Sales Manager Mr. 3/4/1955 12:00:00 AM 10/17/1993 12:00:00 AM 14 Garrett Hill London SW1 8JR UK (71) 555-4848 3453 System.Byte[] Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses "Successful Telemarketing" and "International Sales Management." He is fluent in French. 2 http://accweb/emmployees/buchanan.bmp
6 6 Suyama Michael Sales Representative Mr. 7/2/1963 12:00:00 AM 10/17/1993 12:00:00 AM Coventry House Miner Rd. London EC2 7JR UK (71) 555-7773 428 System.Byte[] Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses "Multi-Cultural Selling" and "Time Management for the Sales Professional." He is fluent in Japanese and can read and write French, Portuguese, and Spanish. 5 http://accweb/emmployees/davolio.bmp
7 7 King Robert Sales Representative Mr. 5/29/1960 12:00:00 AM 1/2/1994 12:00:00 AM Edgeham Hollow Winchester Way London RG1 9SP UK (71) 555-5598 465 System.Byte[] Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled "Selling in Europe," he was transferred to the London office in March 1993. 5 http://accweb/emmployees/davolio.bmp
8 8 Callahan Laura Inside Sales Coordinator Ms. 1/9/1958 12:00:00 AM 3/5/1994 12:00:00 AM 4726 - 11th Ave. N.E. Seattle WA 98105 USA (206) 555-1189 2344 System.Byte[] Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French. 2 http://accweb/emmployees/davolio.bmp
9 9 Dodsworth Anne Sales Representative Ms. 1/27/1966 12:00:00 AM 11/15/1994 12:00:00 AM 7 Houndstooth Rd. London WG2 7LT UK (71) 555-4444 452 System.Byte[] Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German. 5 http://accweb/emmployees/davolio.bmp