🤖 Ai回答: To create a MariaDB table, you need to use the `CREATE table` statement、Here is an example of how to create a table with some sample data:
sql
CREATE table my_table
(\`
id integer NOT null,
name varchar(50) NOT null,
age integer NOT null,
price float NOT null,
PRIMARY key (id)
This table has five columns: `id`, `name`, `age`, and `price`、The `id` column is the primary key, which means it uniquely identifies each row in the table、The other columns are not primary keys and can have duplicate values.
To add data to the table, you can use the `INSERT` statement、Here is an example of how to add a new row to the table:
This statement adds a new row with the values `1` for `id`, `John Smith` for `name`, `25` for `age`, and `100.99` for `price`.
To update data in the table, you can use the `UPDATE` statement、Here is an example of how to update the `price` column for a specific row:
sql
UPDATE my_table
set price = 150.99
where id = 1
This statement updates the `price` column for the row where `id` is `1` to `150.99`.
To delete data from the table, you can use the `DELETE` statement、Here is an example of how to delete a row from the table:
sql
DELETE from my_table
where id = 1
This statement deletes the row where `id` is `1` from the table.
These are some basic operations you can perform on a MariaDB table、There are many more advanced features and functions available in MariaDB、For more information, you can refer to the MariaDB manual or the MariaDB official website.