Top "Ddl" questions

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

How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?

I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error …

spring hibernate jpa database-connection ddl
There can be only one auto column

How do I correct the error from MySQL 'you can only have one auto increment column'. CREATE TABLE book ( id …

mysql ddl
Why use multiple columns as primary keys (composite primary key)

This example is taken from w3schools. CREATE TABLE Persons ( P_Id int NOT NULL, LastName varchar(255) NOT NULL, FirstName …

database-design relational-database primary-key ddl database-table
Truncating a table in a stored procedure

When I run the following in an Oracle shell it works fine truncate table table_name But when I try …

oracle stored-procedures plsql ddl
MySQL: ALTER TABLE if column not exists

I have this code: ALTER TABLE `settings` ADD COLUMN `multi_user` TINYINT(1) NOT NULL DEFAULT 1 And I want to alter …

mysql ddl alter-table
Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?

I want to create a database which does not exist through JDBC. Unlike MySQL, PostgreSQL does not support create if …

sql database postgresql jdbc ddl
How do I add a foreign key to an existing SQLite table?

I have the following table: CREATE TABLE child( id INTEGER PRIMARY KEY, parent_id INTEGER, description TEXT); How do I …

sql sqlite foreign-keys ddl
Delete column from SQLite table

I have a problem: I need to delete a column from my SQLite database. I wrote this query alter table …

sql sqlite ddl
dropping a global temporary table

2 Separate questions. I am using this script to drop a table [SOLVED] BEGIN EXECUTE IMMEDIATE 'DROP TABLE_NAME'; DBMS_OUTPUT.…

oracle plsql ddl temp-tables
SQL Column definition : default value and not null redundant?

I've seen many times the following syntax which defines a column in a create/alter DDL statement: ALTER TABLE tbl …

sql default-value ddl notnull