Top "Ddl" questions

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

How do I add comments to existing table DDL in Teradata?

I am adding some new columns to a table and want to add documentation to the table DDL for future …

ddl teradata
How to change a dataype CLOB TO VARCHAR2(sql)

Table: customers ID NAME DATATYPE NUMBER VARCHAR2(100) CLOB I want to change the DATA column from CLOB to `VARCHAR2(1000) I …

sql oracle ddl clob varchar2
Is string or int preferred for foreign keys?

I have a user table with userid and username columns, and both are unique. Between userid and username, which would …

mysql sql foreign-keys ddl
Postgres database create if not exists

Is there an analog to CREATE TABLE IF NOT EXISTS for creating databases? Background: I am writing a script to …

sql database postgresql ddl
Reverse engineer DDL from JPA entities

I'm playing around with some JPA stuff, changing the mappings to see how they're supposed to be etc. It's basic …

java hibernate orm jpa ddl
Why can I create a table with PRIMARY KEY on a nullable column?

The following code creates a table without raising any errors: CREATE TABLE test( ID INTEGER NULL, CONSTRAINT PK_test PRIMARY …

postgresql constraints primary-key ddl postgresql-9.3
Superkey vs. Candidate key

What difference between Super and Candidate key in ERDB?

sql database database-design ddl
How can I drop all indexes of a table in Postgres?

I keep having this problem: I have like 20 indexes on a table that I need to drop in order to …

postgresql indexing metadata dynamic-sql ddl
Renaming a column in MS SQL Server 2005

What is the best practice when it comes to renaming a table column using SQL (MS SQL Server 2005 variant)? This …

sql sql-server ddl renaming
What does the number in parenthesis really mean?

I always thought that the number in the parenthesis represented the field length? However, I understand that is not always …

mysql sql ddl