Advertisements
Advertisements
प्रश्न
Write a suitable SQL query for the following:
- To extract the first five characters from the
product_codecolumn in theProductstable. - To display the total number of orders from
Order_Idcolumn in theOrderstable. - To display the year of the order dates from the order_date column in the
Orderstable. - To display the
Addresscolumn from theCustomerstable after removing leading and trailing spaces. - To display the current date.
कोड लेखन
Advertisements
उत्तर
-
SELECT LEFT(product_code, 5) FROM Products; -
SELECT COUNT(Order_Id) FROM Orders; -
SELECT YEAR(order_date) FROM Orders; -
SELECT TRIM(Address) FROM Customers; -
SELECT DATE(NOW());
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
