Top "Ddl" questions

Data Definition Language is a subset of SQL to manipulate structural elements of a database, not the content of tables.

Adding comment to column when I create table in PostgreSQL?

How can I add comment to column in PostgreSQL? create table session_log ( UserId int index not null, PhoneNumber int …

postgresql comments ddl
Create or replace trigger postgres

I want to "create or replace" a trigger for a postgres table. However, there is not such sql expression. I …

sql postgresql ddl database-trigger
How to add a new column with foreign key constraint in a single statement in oracle

How to add a new column with foreign key constraint in a single statement in oracle?Can any one give …

sql oracle foreign-keys ddl
Creating a table in h2 database using predefined sequence for primary key

I am trying to create a table in an H2 database. How do I specify that the primary key should …

sequence h2 ddl
How do I conditionally create a table in Sybase (TSQL)?

OK, so Sybase (12.5.4) will let me do the following to DROP a table if it already exists: IF EXISTS ( SELECT 1 …

tsql conditional ddl sap-ase
How can I create a unique index in Oracle but ignore nulls?

I am trying to create a unique constraint on two fields in a table. However, there is a high likelihood …

sql oracle ddl
Force Oracle Drop Global Temp Table

In our project I create some global temp table that will be like these: CREATE GLOBAL TEMPORARY TABLE v2dtemp ( …

oracle plsql ddl temp-tables
UTF8 Postgresql Create Database Like MySQL (including character set, encoding, and lc_type)

For the following MySQL create database statement, what would be the equivalent in postgresql?: CREATE DATABASE IF NOT EXISTS `scratch` …

postgresql encoding character-encoding collation ddl
Generate table DDL via query on MySQL and SQL Server

Is there an easy way to extract table DDL information, via a query, using either Ms or My SQL server? (…

mysql database ddl
How do I DROP a constraint from a sqlite (3.6.21) table?

I have the following table: CREATE TABLE child( id INTEGER PRIMARY KEY, parent_id INTEGER CONSTRAINT parent_id REFERENCES parent(…

sqlite constraints ddl