You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
DROP DATABASE IF EXISTS mcs278_db;
 | 
						|
CREATE DATABASE mcs278_db;
 | 
						|
USE mcs278_db;
 | 
						|
CREATE TABLE t1
 | 
						|
(
 | 
						|
t1_DATE DATE,
 | 
						|
t1_TIMESTAMP TIMESTAMP,
 | 
						|
t1_DATETIME DATETIME
 | 
						|
)ENGINE=Columnstore;
 | 
						|
INSERT INTO t1 VALUES('1991-05-30', '1999-10-28 01:00:50', '2020-12-11 01:08:59');
 | 
						|
INSERT INTO t1 VALUES('2991-10-13', '1972-11-22 11:19:52', '2002-02-21 05:28:37');
 | 
						|
SELECT WEEKDAY('2020-10-12') FROM t1 LIMIT 1;
 | 
						|
WEEKDAY('2020-10-12')
 | 
						|
0
 | 
						|
SELECT WEEKDAY('2020-10-13 12:13:14') FROM t1 LIMIT 1;
 | 
						|
WEEKDAY('2020-10-13 12:13:14')
 | 
						|
1
 | 
						|
SELECT WEEKDAY('12:13:14') FROM t1 LIMIT 1;
 | 
						|
WEEKDAY('12:13:14')
 | 
						|
NULL
 | 
						|
Warnings:
 | 
						|
Warning	1292	Incorrect datetime value: '12:13:14'
 | 
						|
SELECT t1_DATE, WEEKDAY(t1_DATE) FROM t1 ORDER BY 1;
 | 
						|
t1_DATE	WEEKDAY(t1_DATE)
 | 
						|
1991-05-30	3
 | 
						|
2991-10-13	3
 | 
						|
SELECT t1_DATETIME, WEEKDAY(t1_DATETIME) FROM t1 ORDER BY 1;
 | 
						|
t1_DATETIME	WEEKDAY(t1_DATETIME)
 | 
						|
2002-02-21 05:28:37	3
 | 
						|
2020-12-11 01:08:59	4
 | 
						|
SELECT t1_TIMESTAMP, WEEKDAY(t1_TIMESTAMP) FROM t1 ORDER BY 1;
 | 
						|
t1_TIMESTAMP	WEEKDAY(t1_TIMESTAMP)
 | 
						|
1972-11-22 11:19:52	2
 | 
						|
1999-10-28 01:00:50	3
 | 
						|
DROP DATABASE mcs278_db;
 |