Skip to content

Commit

Permalink
[MySQL] Add REPEAT function (#3667)
Browse files Browse the repository at this point in the history
  • Loading branch information
ani-sha authored Aug 17, 2023
1 parent ac357e7 commit e9fa5da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/mysql/Positive-Technologies/MySqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -2574,7 +2574,7 @@ scalarFunctionName
| ASCII | CURDATE | CURRENT_DATE | CURRENT_TIME
| CURRENT_TIMESTAMP | CURTIME | DATE_ADD | DATE_SUB
| IF | INSERT | LOCALTIME | LOCALTIMESTAMP | MID | NOW
| REPLACE | SUBSTR | SUBSTRING | SYSDATE | TRIM
| REPEAT | REPLACE | SUBSTR | SUBSTRING | SYSDATE | TRIM
| UTC_DATE | UTC_TIME | UTC_TIMESTAMP
;

Expand Down
1 change: 1 addition & 0 deletions sql/mysql/Positive-Technologies/examples/dml_select.sql
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ SELECT * FROM test LIMIT LIMIT1,LIMIT2;
-- SCHEMA as a function name
SELECT SCHEMA();
-- Functions
SELECT REPEAT('X',2);
SELECT mod(3,2);SELECT * FROM TEST WHERE TB_SCHEMA = SCHEMA();
-- Group By with computed column
SELECT 1 AS col1, t1.Id FROM t1 GROUP BY col1;
Expand Down

0 comments on commit e9fa5da

Please sign in to comment.