sql - Get the latest row inserted with the help of CreatedDate field -
I am trying to put the latest table in the SQL table based on my textual date. For example, in the table below, I would like to get the third line.
ABC 2009-05-04 19: 30: 52.847 ABD 2009-05-04 19: 30: 55.050 ABE 2009-05-04 19: 30: 57.003 I have a working question, but I am thinking that there is a better way of achieving the same results. Below is the table, data and query that I am currently using for my test. Is there any better way to do this?
include table testlet (column A N VAARAAR (10), column Bn VAARAAR (10), column CN VAARAAR (10), created datetime default Getutcdate ()) Column A, Column B, Column C) Value ('A', 'B', 'C'); Enter the test table (column A, column B, column C) value ('A', 'B', 'D'); INSERT (ColumnA, ColumnB, ColumnC) VALUES ('A', 'B', 'E') in the testlet; Thanks!
You can type
SELECT SELECT 1 * / code>
Comments
Post a Comment