![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am Trying to create viertual columns in a table: create table database1.table1 (columnA int not null, columnB varchar(32), columnC int as (columnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent); What I get: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as (c olumnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent)' at line 3 Y am running mysql server 5.5 on windows Can you help me? Thaks in advance |
#3
| |||
| |||
|
|
I am Trying to create viertual columns in a table: create table database1.table1 (columnA int not null, columnB varchar(32), columnC int as (columnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent); What I get: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as (c olumnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent)' at line 3 Y am running mysql server 5.5 on windows |
#4
| |||
| |||
|
|
Engine | Support | Comment | Transactions | XA Savepoints | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ FEDERATED | NO | Federated MySQL storage engine NULL | NULL | NULL | MRG_MYISAM | YES | Collection of identical MyISAM tables NO | NO | NO | MyISAM | YES | MyISAM storage engine | NO NO | NO | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | CSV | YES | CSV storage engine | NO NO | NO | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | ARCHIVE | YES | Archive storage engine | NO NO | NO | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | PERFORMANCE_SCHEMA | YES | Performance Schema | NO NO | NO | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ |
|
I am Trying to create viertual columns in a table: create table database1.table1 (columnA int not null, columnB varchar(32), columnC int as (columnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent); What I get: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as (c olumnA mod 10) virtual, columnD varchar(5) as (left(columnB,5)) persistent)' at line 3 Y am running mysql server 5.5 on windows But you tested on MariaDB? MySQL does not support virtual columns, but MariaDB does. -- Willem Bogaerts Application smith Kratz B.V. http://www.kratz.nl/ |
#5
| |||
| |||
|
Ok Ok I am new to MySQL![]() For what I can see, there are several DBengines, among them, MariaDB. But MySQL 5.5 does not come with MariaDB as you can see. It is still not ready. Will it come as an update of MySQL ? Or will I Have to install it separatedly? |
#6
| |||
| |||
|
Ok Ok I am new to MySQL ![]() For what I can see, there are several DBengines, among them, MariaDB. But MySQL 5.5 does not come with MariaDB as you can see. It is still not ready. Will it come as an update of MySQL ? Or will I Have to install it separatedly? |
#7
| |||
| |||
|
|
MySQL supports different storage engines but MariaDB is not one of them: it's an entirely different database server forked from MySQL. |
![]() |
| Thread Tools | |
| Display Modes | |
| |