Enterprise Java Development@TOPIC@

Chapter 36. SQL Basics

36.1. Create/INSERT
36.2. Read/SELECT
36.3. Update/UPDATE
36.4. Delete/DELETE
insert 

into
    JPADAO_BOOK
    (ID, DESCRIPTION, PAGES, TITLE) 
values
    (null, 'this and that', 1037, 'gww')

Get the generated primary key value

call IDENTITY()
select

    book.ID,
    book.DESCRIPTION,
    book.PAGES,
    book.TITLE 
from
    JPADAO_BOOK book  
update

    JPADAO_BOOK 
set
    DESCRIPTION='this, that, and the other thing'
where
    ID=3
delete 

from
    JPADAO_BOOK 
where
    ID=?