Difference between revisions of "MariaDB/SQL/CREATE"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< MariaDB‎ | SQL
Jump to navigation Jump to search
Line 1: Line 1:
==Related==
+
{{fmt/title|"CREATE" SQL command}}
* <code>{{l/same|DROP}}</code> deletes existing users
+
==About==
==Example==
+
The <code>CREATE</code> command is how you create various different objects in a database.
* <syntaxhighlight inline lang=SQL>CREATE USER 'roundcube'@localhost IDENTIFIED BY 'yourPasswordHere!';</syntaxhighlight>
+
==Reference==
** '''Note''': <code>'roundcube@localhost'</code> is not the same user as <code>'roundcube'@localhost</code>. The latter creates user 'roundcube' with '@localhost' stored in another field, from what I can tell.
+
* [https://mariadb.com/kb/en/create/ MariaDB Knowledge Base]
** '''Note''': 'password' and "password" are not necessarily identical. At least once, I got an error with 'password' but "password" was fine. The password in question ended with a '^' character, so maybe that was escaping the end-quote-mark or something?
+
==Syntax==
 +
* CREATE {{l/sub|DATABASE}}
 +
* CREATE {{l/sub|TABLE}}
 +
* CREATE {{l/sub|VIEW}} (create or replace)
 +
* CREATE {{l/sub|CATALOG}}
 +
* CREATE {{l/sub|USER}}
 +
* CREATE {{l/sub|TRIGGER}}
 +
* CREATE {{l/sub|EVENT}}
 +
* CREATE {{l/sub|FUNCTION}}
 +
* CREATE {{l/sub|FUNCTION UDF}} - user-defined function
 +
* CREATE {{l/sub|INDEX}}
 +
* CREATE {{l/sub|PACKAGE}}
 +
* CREATE {{l/sub|PACKAGE BODY}}
 +
* CREATE {{l/sub|PROCEDURE}}
 +
* CREATE {{l/sub|ROLE}}
 +
* CREATE {{l/sub|SEQUENCE}}
 +
* CREATE {{l/sub|SERVER}}

Revision as of 22:11, 18 February 2025

"CREATE" SQL command

About

The CREATE command is how you create various different objects in a database.

Reference

Syntax