Are you calling for.... our last dance? I see it in your eyes.... in your eyes Same old moves for... a new romance I could use the same old lines ... But I'll sing...
Shine on, just shine on Close your eyes and they'll all be gone They can scream and shout that they've been sold out, but it paved the cloud that we're dancing on So shine on, just shine on With your smile just as bright as the sun Cause they're all just slaves to the Gods they've made But you and I, just shone, just shone
And when silence greets... my last goodbye The words I need are in you're eyes And I'll sing .....
Shine on, just shine on Close your eyes and they'll all be gone They can scream and shout that they've been sold out but it paid for the cloud that we're dancing on So shine on, just shine on With your smile just as bright as the sun Cause they're all just slaves to the Gods they've made But you and I just shone, just shone
So shine on, just shine on Close your eyes and they'll all be gone They can scream and shout that they've been sold out, but it paid for the cloud that we're dancing on So shine on, just shine on With your smile just as bright as the sun Cause they're all just slaves to the Gods they've made But you and I just shone, just shone.....
Өгөгдлийн санг устгах drop database [database name];
Өгөгдлийн сангаас table устгах drop table [table name];
Table-н бүх өгөгдлийг харах SELECT * FROM [table name];
Table-н талбарын мэдээлэлийг харуулна show columns from [table name];
Table-с ганц талбарын утгаар шүүлт хийнэ SELECT * FROM [table name] WHERE [field name] = "whatever";
Table-с олон талбарын утгаар шүүлт хийнэ "AND" тэмдэгээр талбар хооронд залгаас хийнэ SELECT * FROM [table name] WHERE name = "Orgil" AND gender = 'male';
Table-с олон талбарын утгаар шүүлт хийнэ. Энд "name" талбарын утгаас ялгаатай гэж хайгаад олдсон үрр дүнг "gender" талбараар эрэмбэлж байна SELECT * FROM [table name] WHERE name != "Orgil" AND gender = 'male' order by gender;
За гэх мэт олон комманд байна. Бусдыг нь зүгээр л жагсаагаад бичихээр шийдэв(залхуу хүрчихлээ :-D)
SELECT * FROM [table name] WHERE name like "Org%" AND gender = 'male';
SELECT * FROM [table name] WHERE rec RLIKE "^a$";
SELECT DISTINCT [column name] FROM [table name];
SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;
SELECT COUNT(*) FROM [table name];
SELECT SUM(*) FROM [table name];
select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;
INSERT INTO [table name] (Host,User,Password) VALUES('%','user',PASSWORD('password'));
SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');
grant usage on *.* to bob@localhost identified by 'passwd';
INSERT INTO [table name] (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('%','databasename','username','Y','Y','Y','Y','Y','N'); or grant all privileges on databasename.* to username@localhost;
UPDATE [table name] SET Select_priv = 'Y',Insert_priv = 'Y',Update_priv = 'Y' where [field name] = 'user';
DELETE from [table name] where [field name] = 'whatever';
FLUSH PRIVILEGES;
alter table [table name] drop column [column name];
alter table [table name] add unique ([column name]);
alter table [table name] modify [column name] VARCHAR(3);
alter table [table name] drop index [colmn name];
LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);
Энд харин хэрэгтэй бичлэг байна. Хэрэв та LINUX үйлдлийн систем дээр өгөгдлийн сан backup хийх хэрэг гарвал үүнийг ашиглана биз дээ. mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql