Question

Database questions 1. What is the default way a database will order data when using an...

Database questions

1. What is the default way a database will order data when using an order by?

2. What SQL syntax do you want to use if you want to order items in "reverse" order?

3. If you wanted to retrieve all results from a table (person) that had your same last name (lname), what would the conditional restriction syntax be?

4. Would you have to use quotes in your conditional statement if your data was classified as numeric?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Order by sort the data in ascending order by default

2. To order items in reverse order: ORDER BY COLUMN_NAME DESC;

3. To retrieve all the results with a restriction: SELECT * FROM person WHERE lname = 'specified_last_name_in_query';

4. Quotes are not required in the conditional statement if data was classified as numeric.

Add a comment
Know the answer?
Add Answer to:
Database questions 1. What is the default way a database will order data when using an...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to...

    Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to retrieve all the data field from db_pvfc12_std in table CUSTOMER_T 2.- Run a query to retrieve record --> CustomerID = 11, How many records did you get and why? 3.- Run a query to retrieve all the data field from table Order_T               Once retrieved:                              3.1.- Please name the fields showing: Primary Key, Foreign Key and other fields                              3.2.- What type of...

  • USING SQL TO RETRIEVE DATA FROM DATABASE AND GENERATE REPORTS BASED ON REQUIREMENTS. This is using...

    USING SQL TO RETRIEVE DATA FROM DATABASE AND GENERATE REPORTS BASED ON REQUIREMENTS. This is using SQL Server Management Studio (SSMS). Task: Important: Use one and only one SQL Statement to get results for each of the following items. Query #                                                                Description 1. List the ID and name of the product(s) that didn’t get ordered by any customer. Use a subquery Here is an example of the database schema: Here are the tables created: ESELECT TOP (1000) [CustomerID] [CustomerNamel [Street]...

  • Complete the following tasks using your AP Database. Please submit 1 .doc file of your SQL...

    Complete the following tasks using your AP Database. Please submit 1 .doc file of your SQL statements and a screen shot of a result set showing the data you inserted, updated, or deleted. I want to change the data in the AP database according to the following requirements. 1. I need an additional payment term for Net due 120 days. 2. I need to delete the Vendor Jobtrak because it has never had an invoice. 3. The vendor Coffee Break...

  • Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y dat...

    Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y database (based on the homework assignment 2) 3 IPage 1. For each department whose average employee salary is more than $30,000, write a SQL statement to retrieve the department name and the number of employees working for that department 2. Write a SQL statement to retrieve first name, last name, and address of each employee who lives in Houston, TX. 3. Write a...

  • #1) Display Last Name, First Name, DonorId, Fundname, TotalPledged from the donor’s database (you may need...

    #1) Display Last Name, First Name, DonorId, Fundname, TotalPledged from the donor’s database (you may need to use donor and pledge tables to get the information) for Donor ID 59034. (Your results window should have 3 rows) #2) Display all records from the PurchaseOrderHeader from the AdventureWorks Database that were sold by Employee 261 (Your results window should have 401 rows) #3) Display salesorderid, orderdate, totaldue, and territory name from salesorderheader and salesterritory for all totaldue that are greater than...

  • CUSTTYPE (TID, TypeDesc) CUSTOMER (CID, Lname, Fname, TID, Address, ZIPcode) CUSTORDER (OrderNo, OrderDate, PromiseDate, ShippedDate, ShippingTerm,...

    CUSTTYPE (TID, TypeDesc) CUSTOMER (CID, Lname, Fname, TID, Address, ZIPcode) CUSTORDER (OrderNo, OrderDate, PromiseDate, ShippedDate, ShippingTerm, SalesID, CID) SALESREP (SalesID, Name, Phone, Address, ZIPcode, RepType) ORDERLINE (OrderNo, PID, Qty, Qty_RETD) FTSALESREP (SalesID, MonthPay, Rank) PTSALESREP (SalesID, HourlyRate, WeekHours) ZIP_TABLE (ZIPcode, City, State) VENDOR (VID, Name, Phone ZIPcode) PRODUCT (PID, CateID, ProdName, ProdFinish, Price, Qty_on_Hand, Description, VID) CATEGORY (CateID, CateType) Local View #1: Use three base tables to develop a SQL statement that will list the following information for a customer,...

  • Topic: Inventory Manangement Part A. Database Creation Your database should have a minimum of 4 tables...

    Topic: Inventory Manangement Part A. Database Creation Your database should have a minimum of 4 tables and include both one-to-many and many-to-many relationships. Be sure to include some numeric and/or date fields. Define all appropriate constraints, using the proper naming conventions (see Structure Notes below). Populate your database with at least 30 records in the main table(s), and whatever is needed in related tables. Submit the following: • a short description of the purpose of the database and what the...

  • Using SQL and the following info Question 3: Find the people who do not have Viper...

    Using SQL and the following info Question 3: Find the people who do not have Viper Certification but are still assigned to Viper class ship Find the fname, lname, and ship_instance_id for all people who do not have Viper certification but are assigned to at least one instance of a Viper class ship (this includes all variants of Viper class ships). Return a row for every ship/person combination. Order your results by fname in ascending order. Use the BSG database...

  • Using SQL and the following info Question 3: Find the people who do not have Viper...

    Using SQL and the following info Question 3: Find the people who do not have Viper Certification but are still assigned to Viper class ship Find the fname, lname, and ship_instance_id for all people who do not have Viper certification but are assigned to at least one instance of a Viper class ship (this includes all variants of Viper class ships). Return a row for every ship/person combination. Order your results by fname in ascending order. Use the BSG database...

  • You need to create your own connection string. So you need to know what each of...

    You need to create your own connection string. So you need to know what each of the parts of the connection string mean. The connection string needs to know the location where the SQL Server resides, and that's usually a domain name or IP address. This may vary! Then you need to know who you are talking to, and that is the name of the server. This is the initial catalog. The AttachDbFilename shows the name of the file and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT