मराठी

Write a suitable SQL query for the following: I. To extract the first five characters from the product_code column in the Products table. - Informatics Practices

Advertisements
Advertisements

प्रश्न

Write a suitable SQL query for the following:

  1. To extract the first five characters from the product_code column in the Products table.
  2. To display the total number of orders from Order_Id column in the Orders table.
  3. To display the year of the order dates from the order_date column in the Orders table.
  4. To display the Address column from the Customers table after removing leading and trailing spaces.
  5. To display the current date.
कोड लेखन
Advertisements

उत्तर

  1. SELECT LEFT(product_code, 5) FROM Products;
  2. SELECT COUNT(Order_Id) FROM Orders;
  3. SELECT YEAR(order_date) FROM Orders;
  4. SELECT TRIM(Address) FROM Customers;
  5. SELECT DATE(NOW());
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×