Académique Documents
Professionnel Documents
Culture Documents
Count:
The count of interval that is added.
Escape Syntax:
{fn TIMESTAMPADD (interval, count, timestamp)}
Return Type:
TIMESTAMP
Alternative Function Names:
DATEADD: This is the equivalent from the MS SQL Server.
Alternative Interval Names: Year yy, yyyy
quarter qq, q
Month mm, m
dayofyear dy, y
Day dd, d
Week wk, ww
Hour hh
minute mi, n
second ss, s
millisecond ms
Examples:
see also:
SQL Date Time Functions mbentukan database
Creating tables (Creating tables)
Syntax
CREATE TABLE (
()
[UNIQUE] [NOT nul] [PRIMARY KEY] [DEFAULT]
[Referential_constraint_defenition>] [CHECK],
()
[UNIQUE] [NOT NULL] [PRIMARY KEY] [DEFAULT]
[Referential_constraint_defenition>] [CHECK],
...
);
information
Example:
);
CREATE TABLE Mata_Pelajaran (
Code CHAR (4),
Name CHAR (20),
Class CHAR (2)
);
CREATE TABLE Value (
No_Induk CHAR (8),
Code CHAR (4),
Nl_Angka Numbers
);
Creates an index (Creating indices)
Syntax
...
[() REFERENCES (),. . . ]
CREATE INDEX ON ();
Example:
ALTER TABLE
[ADD ((),...);]
[Modify ((),...);]
Information
DROP INDEX
Example:
INSERT INTO [(
VALUES
(,,...);
Example:
UPDATE
SET,
,
...,
[WHERE];
Example:
UPDATE Students
SET No_Induk = '00311216 ', Name =' Wati '
WHERE No_Induk = '00311210 'and name =' Satria ';
Delete data (Deletion)
Syntax
DELETE FROM
WHERE;
Example:
CREATE VIEW
SELECT U.S.
FROM
WHERE;
III. Data Control Language (DCI) / Control Data
Confirmation of storing data in memory to the database (Commit)
Syntax
COMMIT [WORK];
Example:
ROLLBACK [WORK];
Granting rights from one user to another user (Grant)
Syntax
GRANT
ON TO
[Gran WITH OPTION];
Abolition of rights granted (REVOKE)
Syntax
REVOKE
FROM;
Access Specification
All Privileges; All rights given.
Select; For selection
Update: To change data
Insert: To insert data
Delete: To remove data
IV. EXPRESSION
FROM
To define the table that becomes a source of data from a command selection
Example:
SELECT
FROM
WHERE
GROUP BY;
Example:
SELECT
FROM
WHERE
ORDER BY [DESC];
Example:
SELECT
FROM
WHERE
GROUP BY
HAVING;
Example:
Two terms of comparison with the value data types being compared must be the same
Equal to, =
Not the same,
Smaller, <
Larger>
Smaller and equal to,> =
Larger and equal to, <=
Betwen
NOT IN (...)
NOT IN SELECT ...
Example:
To compare the data with the pattern / a particular structure, to use one character (_) and
strings (%)
Syntax:
... LIKE
... NOT LIKE
Example:
... IS NULL
... IS NOT NULL
Example:
Other Articles:
Comment
Add Comment Search
<<Begin <Prev 1 2 Next> End>>
<<Begin <Prev 1 2 Next> End>>
thanks
Reply | Quote
Revelation - Remove the existing data of two tables d | 94.246.126.xxx | 2009-03-07
01:26:30
Mas I want to ask nh, Are You cranya delete existing data d 2 table with one keypress
delete.untuk printah sqlny yes Are You? Mkasih.
Reply | Quote
Wempi - bwt: revelation | 202.93.47.xxx | 2009-03-07 15:06:51
aja make it 2x the delete command in the program om the delete button.
but we can also ngeset directly in the database if it relates to the second table / reference,
if the mysql enggine use tools that replace the default MyISAM InnoDB.
If staying for Oracle classmates referencenya key, and set the ON DELETE CASCADE,
foreign key if it didelete,
Urgent!
Reply | Quote
Wempi - bwt: Edisen | 202.93.47.xxx | 2008-11-04 16:54:24
sorry still not grasp the purpose wempi om demand, inter-table query how ya?
Afrikaans
Albanian
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bulgarian
Catalan
Chinese Croatian
Czech
Danish
Dutch
English
Estonian
Filipino
Finnish
French
Galician Georgian
German
Greek
Haitian Creole
Hebrew
Hindi
Hungarian
Icelandic
Indonesian
Irish Italian
Japanese
Korean
Latvian
Lithuanian
Macedonian
Malay
Maltese
Norwegian
PersianPolish
Portuguese
Romanian
Russian
Serbian
Slovak
Slovenian
Spanish
Swahili
Swedish Thai
Turkish
Ukrainian
Urdu
Vietnamese
Welsh
Yiddish
Football fever? Speak soccer in any language with Google Translate. Learn more!
©2010 Google - Turn off instant translation - Privacy Policy - Help