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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
