   (-unwrap [self]
     (-unwrap @self)))
 
+(extend-protocol ITableCoerce
+  org.jooq.Name
+  (-as-table [v selectexp]
+    (assert (instance? Select selectexp))
+    (.as v selectexp))
+
+  org.jooq.DerivedColumnList
+  (-as-table [v selectexp]
+    (assert (instance? Select selectexp))
+    (.as v selectexp)))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Common DSL functions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defn as-table
-  "Coerce querypart to table expression."
-  [o & args]
-  (defer
-    (->> (map -unwrap args)
-         (-as-table o))))
-
-(defn as-field
-  "Coerce querypart to field expression."
-  [o alias]
-  (defer
-    (let [o (-unwrap o)]
-      (.asField o alias))))
 
 (defn field
   "Create a field instance."
-  [data & [{:keys [alias] :as opts}]]
-  (let [f (-field data)]
-    (if alias
-      (.as f (clojure.core/name alias))
-      f)))
+  ([v]
+   (-field v))
+  ([v alias]
+   (-> (-field v)
+       (.as (clojure.core/name alias)))))
+
+(defn table
+  "Create a table instance."
+  ([v]
+   (-table v))
+  ([v alias]
+   (-> (-table v)
+       (.as (clojure.core/name alias)))))
+
+(defn to-table
+  "Coerce querypart to table expression."
+  [texp talias & params]
+  (defer
+    (let [texp (-unwrap texp)
+          talias (-unwrap talias)]
+      (cond
+        (clojure.core/and (satisfies? ITableCoerce texp)
+                          (instance? Select talias))
+        (-as-table texp talias)
+
+        (instance? TableLike texp)
+        (let [talias (clojure.core/name (-unwrap talias))
+              params (into-array String (map clojure.core/name params))]
+          (.asTable texp talias params))))))
+
+(defn f
+  "Create a field instance, specialized on
+  create function like field instance."
+  [v]
+  (-field v))
 
 (defn typed-field
   [data type]

  deferred queries."
  (-unwrap [_] "Unwrap the object"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Protocol Implementations
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  Object
  (-val [v] (DSL/val v)))

(extend-protocol IDeferred
  Object
  (-unwrap [self]
