CONTENT
  • CHANGES
Szukaj
counter

#top Zapytania SQL



#top users


#top USER CREATE


Zobacz także USER CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top USER ALTER


Zobacz także USER ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment


#top USER SET PASSWORD


Zobacz także USER SET PASSWORD dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top USER DROP


Zobacz także USER DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top permissions


#top GRANT


Zobacz także GRANT dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top REVOKE


Zobacz także REVOKE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top SHOW GRANTS


Zobacz także SHOW GRANTS dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:
comment

Example:
-- comment



#top databases


#top DATABASE CREATE


Zobacz także DATABASE CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top DATABASE ALTER


Zobacz także DATABASE ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top DATABASE DROP


Zobacz także DATABASE DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top schemas


#top SCHEMA CREATE


Zobacz także SCHEMA CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top SCHEMA ALTER


Zobacz także SCHEMA ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top SCHEMA DROP


Zobacz także SCHEMA DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top tablespaces


#top TABLESPACE CREATE


Zobacz także TABLESPACE CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top TABLESPACE ALTER


Zobacz także TABLESPACE ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top TABLESPACE DROP


Zobacz także TABLESPACE DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top tables


#top TABLE CREATE


Zobacz także TABLE CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:



#top TABLE CREATE LIKE


Zobacz także TABLE CREATE LIKE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE AS


Zobacz także TABLE CREATE AS dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
Nie jest to wierna kopia struktury originalnej tabeli !!!
-- comment


#top TABLE CREATE with PRIMARY KEY


Zobacz także TABLE CREATE with PRIMARY KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with auto_increment


Zobacz także TABLE CREATE with auto_increment dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with UNIQUE KEY (singlecolumn)


Zobacz także TABLE CREATE with UNIQUE KEY (singlecolumn) dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with UNIQUE KEY (multicolumn)


Zobacz także TABLE CREATE UNIQUE KEY (multicolumn) dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with FULLTEXT KEY


Zobacz także TABLE CREATE with FULLTEXT KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with FOREIGN KEY


Zobacz także TABLE CREATE with FOREIGN KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with INDEX


Zobacz także TABLE CREATE with INDEX dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with partitioned


Zobacz także TABLE CREATE with partitioned dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with COLLATE without UNIQUE


Zobacz także TABLE CREATE with COLLATE without UNIQUE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE CREATE with COLLATE with UNIQUE


Zobacz także TABLE CREATE with COLLATE with UNIQUE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment



#top TABLE ALTER


Zobacz także TABLE ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:



#top TABLE ALTER with PRIMARY KEY


Zobacz także TABLE ALTER with PRIMARY KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with auto increment


Zobacz także TABLE ALTER with auto_increment dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with UNIQUE KEY (singlecolumn)


Zobacz także TABLE ALTER with UNIQUE KEY (singlecolumn) dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with UNIQUE KEY (multicolumn)


Zobacz także TABLE ALTER UNIQUE KEY (multicolumn) dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with FULLTEXT KEY


Zobacz także TABLE ALTER with FULLTEXT KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with FOREIGN KEY


Zobacz także TABLE ALTER with FOREIGN KEY dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with INDEX


Zobacz także TABLE ALTER with INDEX dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with partitioned


Zobacz także TABLE ALTER with partitioned dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with COLLATE without UNIQUE


Zobacz także TABLE ALTER with COLLATE without UNIQUE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment


#top TABLE ALTER with COLLATE with UNIQUE


Zobacz także TABLE ALTER with COLLATE with UNIQUE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Example:
-- comment



#top TABLE RENAME


Zobacz także TABLE RENAME dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Brak obsługi zmiany nazw tabel!!! Przeczytaj poniższy tekst przedstawiający możliwości realizacji tej operacji
zaczerpnięty ze strony http://www.firebirdfaq.org/faq363/.

How to rename a database table?
This is not possible. You have two options:

1. Create a new table with a different name. You can use your favorite administration tool to extract DDL statement for the old table and just replace the table name. After you create a new table, copy the data using a statement like this:
insert into newtable select * from oldtable;

2. Create a view that is identical to your old table. In fact, you get to keep the table, and use the view as a kind of an alias:
create view newname (columns...)
as
select columns...
from oldtable;

Such plain VIEWS even allow DML statement like UPDATE, INSERT and DELETE and will change the records in the underlying table.
Make sure you test this well because different Sybase versions may behave differently regarding the automatic behavior of such views.



#top TABLE TRUNCATE


Zobacz także TABLE TRUNCATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Brak obsługi usuwania danych / zerowania / przycinania tabeli!!! Przeczytaj poniższy tekst przedstawiający możliwości realizacji tej operacji
zaczerpnięty ze strony http://www.firebirdnews.org/rfc-truncate-table-in-firebird/.

One of the often task in ETL applications is to quick erase all data in some table(s). Often amount of data is big or huge (tens of millions records).
In Sybase we have two choices currently – DELETE all rows or RECREATE TABLE. Both have its own drawbacks.
DELETE produced a lot of record versions to clean up, its slow as works row-by-row basis and fire triggers which is almost always is not needed.
RECREATE is free from this drawbacks but it will fail if there is dependencies and all related objects such as triggers, indices, constraints must be recreated too.


#top TABLE DROP


Zobacz także TABLE DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example:
-- comment



#top sequences


#top SEQUENCE CREATE


Zobacz także SEQUENCE CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top SEQUENCE ALTER


Zobacz także SEQUENCE ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top SEQUENCE DROP


Zobacz także SEQUENCE DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example:
-- comment



#top indexes


#top INDEX CREATE


Zobacz także INDEX CREATE dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:


Example: alter table add INDEX
-- comment



#top INDEX ALTER


Zobacz także INDEX ALTER dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example: alter table add INDEX
-- comment



#top INDEX DROP


Zobacz także INDEX DROP dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:


Składnia:
comment

Example: alter table drop INDEX
-- comment



#top functions


#top Functions and Operators


Zobacz także Functions and Operators dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Example:
-- comment



#top DATA Manipulations


#top SELECT with LIMIT and OFFSET


Zobacz także SELECT with LIMIT and OFFSET dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1601/doc/html/san1281564978024.html

Składnia:
comment

Example:
-- comment

Po wykonaniu powyższych zapytań mających na celu utworzenie tabeli oraz dodaniu przykładowych danych można wykonać poniższe zapytania w celu sprawdzenia działania klauzul LIMIT przy wyświetlaniu danych z tabeli:
-- comment

Uzyskany rezultat powinien być analogiczny do poniższego:
comment


Po wykonaniu powyższych zapytań mających na celu utworzenie tabeli oraz dodaniu przykładowych danych można wykonać poniższe zapytania w celu sprawdzenia działania klauzul LIMIT oraz OFFSET przy wyświetlaniu danych z tabeli:
-- comment

Uzyskany rezultat powinien być analogiczny do poniższego:
comment



#top WHERE IN subselect with multiple columns


Zobacz także WHERE IN subselect with multiple columns dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase



#top Deleting duplicates rows


Zobacz także Deleting duplicates rows dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase



#top WHERE IN subselect with multiple columns


Zobacz także WHERE IN subselect with multiple columns dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase



#top REPLACE INTO


Zobacz także REPLACE INTO dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:
comment

Example:
-- comment



#top GROUP with CONCAT


Zobacz także GROUP with CONCAT dla: PostgreSQL | MySQL | Firebird | SQLite | MsSQL | Oracle | DB2 | Informix | Sybase

Dokumentacja Sybase:

Składnia:
-- comment










































Zmodyfikowany ostatnio: 2017/11/02 00:01:09 (7 lat temu), textsize: 38,4 kB, htmlsize: 76,1 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników