Build Your Own DatabaseDriven Website Using PHP amp;amp; MySQL [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Build Your Own DatabaseDriven Website Using PHP amp;amp; MySQL [Electronic resources] - نسخه متنی

Kevin Yank

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








RENAME TABLE


RENAME TABLE tbl_name TO new_table_name[, tbl_name2 TO ..., ...]

This query quickly and conveniently renames one or more tables. This
differs from ALTER TABLE tbl_name RENAME in that all the
tables being renamed in the query are locked for the duration of the query,
so that no other connected clients may access them. As the MySQL
Reference Manual explains
, this assurance of atomicity lets you replace
a table with an empty equivalent, for example, if you wanted to start a new
table once a certain number of entries was reached, safely:

CREATE TABLE new_table (...)
RENAME TABLE old_table TO backup_table, new_table TO old_table;

You can also move a table from one database to another by specifying
the table name as db_name.tbl_name, as long as both tables
are stored on the same physical disk, which is usually the case.

You must have ALTER and DROP privileges
on the original table, as well as CREATE and INSERT privileges
on the new table to perform this query. A RENAME TABLE query
that fails to complete halfway through will be automatically reversed, so
that the original state is restored.

/ 190