*   >> läser Utbildning artiklar >> science >> programming

Ändra och släppa tabeller i Mysql

allas Inköp. - Nu kommer du att ta bort tabellen du just har skapat. Skriv följande och kör: DROP TABLE Köpes; Den nya tabellen köpet borde ha raderats. Låt oss nu släppa förbindelsen, stoppa databasen och stoppa servern. Skriv följande och tryck på Enter: QUITComplete Syntax Alter en tabell Den fullständiga syntaxen för SQL-sats för att ändra en tabell nedan; blick igenom den och läsa förklaringen under den: ALTER TABLE Syntax ALTER [ONLINE | OFFLINE] [Ignorera] TABELL tbl_name alter_specification [, alter_specification] ...

alter_specification: table_options | ADD [COLUMN] col_name column_definition [FÖRSTA | EFTER col_name] | ADD [COLUMN] (col_name column_definition, ...) | ADD {INDEX | KEY} [namn] [index_type] (index_col_name, ...) [index_option] ... | ADD [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name, ...) [index_option] ... | ADD [CONSTRAINT [symbol]] UNIK [INDEX | KEY] [namn] [index_type] (index_col_name, ...) [index_option] ... | ADD FULLTEXT [INDEX | KEY] [namn] (index_col_name, ...) [index_option] ... | LÄGG SPATIAL [INDEX | KEY] [namn] (index_col_name, ...) [index_option] ...

| ADD [CONSTRAINT [symbol]] FOREIGN KEY [namn] (index_col_name, ...) reference_definition | ALTER [KOLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} | FÖRÄNDRING [KOLUMN] old_col_name new_col_name column_definition [FÖRSTA | EFTER col_name] | MODIFY [KOLUMN] col_name column_definition [FÖRSTA | EFTER col_name] | DROP [KOLUMN] col_name | DROP PRIMARY KEY | DROP {INDEX | KEY} index_name | DROP FOREIGN KEY fk_symbol | Inaktivera tangenter | AKTIVERA nycklar | RENAME [TO] new_tbl_name | ORDER BY col_name [, col_name] ...

| Konvertera till Teckenuppsättning charset_name [COLLATE collation_name] | [Standard] teckenuppsättningen [=] charset_name [Sortera [=] collation_name] | KASTA tabell | IMPORT tabell | partition_options | ADD partition (partition_definition) | DROP VÄGGAR partition_names | COALESCE PARTITION nummer | FÖRNYAR SKILJEVÄGG [partition_names INTO (partition_definitions)] | ANALYS SKILJE {partition_names | ALL} | CHECK VÄGGAR {partition_names | ALL} | OPTIMERA SKILJE {partition_names | ALL} | REBUILD SKILJE {partition_names | ALL} | Repair Partition {partition_names | ALL} | Partition genom partitioning_expression | AVLÄGSNA PARTITIONING index_col_name: col_name [(längd)] [ASC | DESC] index_type: ANVÄNDA {btree | HASH} index_option: KEY_BLOCK_SIZE [=] värde | index_type | MED PARSER parser_name table_options: table_option [[,] table_option] .

.. (

Page   <<  [1] [2] [3] >>
Copyright © 2008 - 2016 läser Utbildning artiklar,https://utbildning.nmjjxx.com All rights reserved.