Joke Collection Website - News headlines - The sql statement adds a column to the table and sets the default value.
The sql statement adds a column to the table and sets the default value.
[code = "Java "] Select (
Account_id=''
Then' empty'
When the account ID is empty
Then' empty'
ELSE account _id
End?
) account id
From where? Account?
Where account_id = 'XXX' or account_id ='' or (account_id is empty) [/code]
Extended data:
SQL default value is a default data of non-empty field data in the database. When setting the default value, the field is set to be non-empty, but no value is given when inserting data, and the database will automatically insert it with the default value. If you insert values normally, you need to add passwords manually, but if there are a large number of fields that can use default values, the statement is a bit bloated. Set the default value of the password field.
Create? Table? Stu (
stuId? varchar2(30)? Elementary? Keys,
stuName? varchar2(50)? Isn't it? Empty,
Stusykes? char(2)? Check (stuSex? In ('male',' female')? Default? Male? -There are no default properties in Oracle?
Stuge? Quantity (2)? Check (stuAge? & gt 1),
stuJg? varchar2(30),? -Hometown
stuDept? varchar 2(40));
Baidu Encyclopedia-Structured Query Language
- Previous article:Experience of writing an article on promoting Putonghua.
- Next article:What are the full-time institutions of Baoji Administrative Center?
- Related articles
- Quotations about mountain climbing_Classic quotations
- Lantern riddles in the year of the tiger; ; ; ; ; ? 、
- Sample work plan format
- Birthday red envelope greetings
- How to build a parent group?
- How to write the greeting on the child's birthday cake?
- Office building lobby decoration. What are the things to pay attention to?
- Say bad slogans
- What's the use of China and honker?
- English translation: It is not easy for parents to raise us. We should be grateful to our parents and repay them. Next, please enjoy the videos and songs.