Script for Database (How To Make Default Field when Create Table)
This is query to make default field in database when we create table,
the example make ADDRESS default field to Indonesia. so, if we insert
table and the ADDRESS field is null. the record of ADDRESS field is
Indonesia.
CREATE TABLE IDENTITY(
NAMES VARCHAR(50),
AGE INTEGER,
ADDRESS VARCHAR(100) default'Indonesia');
CREATE TABLE IDENTITY(
NAMES VARCHAR(50),
AGE INTEGER,
ADDRESS VARCHAR(100) default'Indonesia');
No comments