If you run following script in this SQL Command. Itwill give you same results and no performance difference. It will return the current server time.
SELECT CURRENT_TIMESTAMP;
SELECT {fn NOW()};
SELECT getdate();
The GETDATE() function returns the current date and time from the SQL Server.
If you want to take records within a certain date range.
SYNTAX:
SELECT * FROM TABLENAME WHERE DateTime <= getdate();
SELECT * FROM post WHERE Postedon <= getdate();
Post your comments / questions
Recent Article
- Fix-Gradient effect turning to gray in after effects
- How to blur an image in python?
- ModuleNotFoundError: No module named 'whois' in Python GoviralHost Without Terminal
- How to Convert Image to Pencil Sketch in Python?
- AttributeError: module 'urllib' has no attribute 'request' - Python
- How to Extract audio from video files using python?
- PermissionError: [Errno 13] Permission denied: 'shampoo_sales.csv' - Python
- [WinError 145] The directory is not empty: 'FolderPath' - Python
Related Article