-
select * from table_name where to_char(col_date,'yyyy-mm-dd hh24:mi:ss') = '2011-07-08 17:
select * from table_name where col_date = to_date('2011-07-08 17:14:16','yyyy-mm-dd hh24:
mi:ss') ;
If you search the Internet, you can see the usage of the to char() to date() functions.
-
The time of the database is obtained from the system, so it is enough to modify the time of the system directly.
If the clock is inaccurate, we recommend that you enable the clock synchronization service on the operating system.
-
Stop the database, then modify the system time, and then restart the database.
-
You can directly change the operating system time of the database server.
-
Generally two months later, in June, the August rush can be found in the field, and your difference this time is not much in mid to late February, so you don't have to wait until the start of school. I wish you well in passing the exam.
-
Around March 2012, it will be done.
-
Your when condition compares the size of 2 strings, and the string format is 'dd-mon-yy'Note that the first character of your qualifier is '0', so your comparison results are 'false'', so you just need to change to date comparison, when hire date < to date('01-Jan-95','dd-mono-yy')
Hope it helps.
-
The first SQL, you're comparing with strings.
The first letter will be compared sequentially, and if it is the same, it will be compared in turn.
Therefore, as long as the first two letters are greater than 01, false will be output.
The following SQL is more normal, you are using the date type to compare.
-
Execute the following command: select to char(sysdate,'dd-mon-yy') from dual;
Look what the result is, mine is: 01-may-14
I suspect that your to date may not have worked out.
For character date conversion, it is recommended to use yyyy-mm-dd when hire date < to date('1990-01-01','yyyy-mm-dd') then '90'
-
Directly subtract date a - date b will make a difference by a value, this value is in days, and you need to multiply 24*60*60 to calculate how many seconds the time difference is.
-
1: select * from a where Creation time = to date('2011-05-04 18:20:
11','yyyy-mm-dd hh24:mi:ss')
2: select * from a where to char (Creation time,.)'yyyy-mm-dd hh24:mi:
ss') = '2011-05-04 18:20:11'
If your Create Time field is character-based, it's easier to select * from a where Creation Time ='2011-05-04 18:20:11'
-
1--- Convert the value of the query to a date for comparison, select * from a where create date = to date('2011-05-04 18:20:11','yyyy-mm-dd hh24:
mi:ss')
2--- Convert the date field to a string for comparison, select * from a where to char(create date,'yyyy-mm-dd hh24:mi:ss') = '2011-05-04 18:
-
Woo woo Maintenance for so long I ate 2 bottles of old wine for nothing.
You can contact a Pearson Vue agent at Pearson VUE, or contact the test center directly. >>>More
domain name:
registrar: xiamen chinasource internet service co., ltd. >>>More
Create table as **selectThe table should exist in the data dictionary, so that the table can be created successfully, you have a complex subquery, such as count(*)as samplid, how does the database know whether samplid should be created as int or bigint? It is recommended that you split the dynamic statement into two statements, one for the regular table creation statement and the other for the insert statement.
Visually, your stored procedure needs to run at these moments: >>>More
select top(1)* from table_name order by update_time desc
My idea is to find the result of the first place in descending order of modification time, isn't it? >>>More